-
Notifications
You must be signed in to change notification settings - Fork 16
/
build.gradle
155 lines (131 loc) · 4.45 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
apply plugin: 'groovy'
apply plugin: 'idea'
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: 'java-gradle-plugin'
project.group = GROUP_ID
project.archivesBaseName = ARTIFACT_ID
project.version = VERSION_NAME
repositories {
mavenCentral()
google()
}
configurations {
gradleApi
compile.extendsFrom gradleApi
gradleApi.extendsFrom groovy
}
dependencies {
gradleApi gradleApi()
groovy localGroovy()
implementation 'com.android.tools.build:builder-test-api:8.2.2'
implementation 'com.android.tools:annotations:31.2.2'
implementation 'com.testdroid:testdroid-api:3.26'
implementation 'com.google.guava:guava:31.1-jre'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.2'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.10.2'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.10.2'
testImplementation 'com.android.tools.build:gradle:8.2.2'
testImplementation 'com.android.tools.build:gradle-core:3.1.4'
implementation 'com.google.protobuf:protobuf-java:3.21.8'
testImplementation 'io.netty:netty-codec-http:4.1.106.Final'
testImplementation 'io.netty:netty-codec-http2:4.1.106.Final'
testImplementation 'com.google.code.gson:gson:2.9.0'
testImplementation 'commons-io:commons-io:2.11.0'
testImplementation 'org.apache.commons:commons-compress:1.21'
testImplementation 'org.jsoup:jsoup:1.17.2'
testImplementation 'org.jdom:jdom2:2.0.6.1'
testImplementation 'xerces:xercesImpl:2.12.2'
testImplementation 'com.google.crypto.tink:tink:1.6.1'
// force newer versions due to security issues in gradle-core:3.1.4:
testImplementation 'org.jetbrains.kotlin:kotlin-stdlib:1.9.22'
testImplementation 'org.jetbrains.kotlin:kotlin-reflect:1.9.22'
testImplementation 'commons-codec:commons-codec:1.16.1'
}
gradlePlugin {
plugins {
testdroid {
id = 'testdroid'
implementationClass = 'com.testdroid.TestDroidPlugin'
}
}
automatedPublishing = false
}
// custom tasks for creating source/javadoc jars
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier.set('sources')
from sourceSets.main.allSource
}
javadoc {
exclude "**/internal/**"
options.memberLevel = JavadocMemberLevel.PROTECTED
title "Testdroid"
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier = 'javadoc'
from javadoc.destinationDir
}
// add javadoc/source jar tasks as artifacts
artifacts {
archives jar
archives sourcesJar
archives javadocJar
}
project.ext.sonatypeUsername = hasProperty('sonatypeUsername') ? sonatypeUsername : ""
project.ext.sonatypePassword = hasProperty('sonatypePassword') ? sonatypePassword : ""
publishing {
publications {
mavenJava(MavenPublication) {
artifact sourcesJar
artifact javadocJar
from components.java
groupId = GROUP_ID
artifactId = ARTIFACT_ID
version = VERSION_NAME
pom {
name = POM_NAME
description = POM_DESCRIPTION
url = POM_URL
scm {
url = POM_SCM_URL
connection = POM_SCM_CONNECTION
developerConnection = POM_SCM_DEVELOPER_CONNECTION
}
licenses {
license {
name = POM_LICENSE_NAME
url = POM_LICENSE_URL
distribution = POM_LICENSE_DSITRIBUTIION
}
}
developers {
developer {
name = 'Sakari Rautiainen'
}
}
scm {
url = POM_SCM_URL
connection = POM_SCM_CONNECTION
developerConnection = POM_SCM_DEVELOPER_CONNECTION
}
}
}
}
repositories {
maven {
url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
credentials {
username = project.ext.sonatypeUsername
password = project.ext.sonatypePassword
}
}
}
}
signing {
required { gradle.taskGraph.hasTask(":publishMavenJavaPublicationToMavenRepository") }
sign publishing.publications.mavenJava
}