Skip to content

Commit f362773

Browse files
authored
Gradle example improvements (#22)
* Add a filter on the repository * Use new notation for sources and javadoc jars
1 parent 9b80020 commit f362773

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

usage-examples/jdt-gradle-example/build.gradle

+6-11
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ wrapper {
88
}
99

1010
java {
11+
withJavadocJar()
12+
withSourcesJar()
1113
toolchain {
1214
languageVersion = JavaLanguageVersion.of(8)
1315
}
@@ -17,21 +19,14 @@ java {
1719
repositories {
1820
maven {
1921
url 'https://raw.githubusercontent.com/jmini/ecentral/HEAD/repo'
22+
content {
23+
includeGroup 'fr.jmini.ecentral'
24+
}
2025
}
2126
mavenCentral()
2227
}
2328
//end::repositories[]
2429

25-
task sourcesJar(type: Jar, dependsOn: classes) {
26-
classifier = 'sources'
27-
from sourceSets.main.allSource
28-
}
29-
30-
task javadocJar(type: Jar) {
31-
from javadoc
32-
classifier = 'javadoc'
33-
}
34-
3530
//tag::dependencies[]
3631
dependencies {
3732
implementation platform('fr.jmini.ecentral:eclipse-platform-dependencies:4.14')
@@ -59,4 +54,4 @@ spotless {
5954
// available versions are: https://github.com/diffplug/spotless/tree/master/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter
6055
eclipse('4.13.0').configFile('.settings/org.eclipse.jdt.core.prefs')
6156
}
62-
}
57+
}

0 commit comments

Comments
 (0)