Skip to content

Commit f34b516

Browse files
authored
chore: Use Gradle 6 built-in support for javadoc and source jars (appium#1301)
https://docs.gradle.org/6.0/release-notes.html#javadoc-sources-jar
1 parent 12f3b6d commit f34b516

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

build.gradle

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,14 @@ dependencies {
3737
lombok 'org.projectlombok:lombok:1.18.8'
3838
}
3939

40-
compileJava {
41-
sourceCompatibility = 1.8
42-
targetCompatibility = 1.8
40+
java {
41+
sourceCompatibility = JavaVersion.VERSION_1_8
42+
targetCompatibility = JavaVersion.VERSION_1_8
43+
withJavadocJar()
44+
withSourcesJar()
45+
}
4346

47+
compileJava {
4448
def ecjJar = configurations.ecj.singleFile
4549
def lombokjar = configurations.lombok.singleFile
4650

@@ -117,16 +121,6 @@ checkstyle {
117121
}
118122
checkstyleMain.excludes = ['**/org/openqa/selenium/**']
119123

120-
task sourcesJar(type: Jar) {
121-
from sourceSets.main.allJava
122-
archiveClassifier = 'sources'
123-
}
124-
125-
task javadocJar(type: Jar) {
126-
from javadoc
127-
archiveClassifier = 'javadoc'
128-
}
129-
130124
javadoc {
131125
options.addStringOption('encoding', 'UTF-8')
132126
}

0 commit comments

Comments
 (0)