| @@ -1,50 +1,51 | |||||
| 1 | plugins { |
|
1 | plugins { | |
| 2 | id "java-library" |
|
2 | id "java-library" | |
| 3 | id "ivy-publish" |
|
3 | id "ivy-publish" | |
| 4 | } |
|
4 | } | |
| 5 |
|
5 | |||
| 6 | java { |
|
6 | java { | |
| 7 | withJavadocJar() |
|
7 | withJavadocJar() | |
| 8 | withSourcesJar() |
|
8 | withSourcesJar() | |
| 9 | toolchain { |
|
9 | toolchain { | |
| 10 | languageVersion = JavaLanguageVersion.of(21) |
|
10 | languageVersion = JavaLanguageVersion.of(21) | |
| 11 | } |
|
11 | } | |
| 12 | } |
|
12 | } | |
| 13 |
|
13 | |||
| 14 | dependencies { |
|
14 | dependencies { | |
| 15 | compileOnly libs.jdt.annotations |
|
15 | compileOnly libs.jdt.annotations | |
| 16 |
|
16 | |||
| 17 | api gradleApi(), |
|
17 | api gradleApi(), | |
| 18 | libs.bundles.jackson |
|
18 | libs.bundles.jackson | |
| 19 |
|
19 | |||
| 20 | testImplementation gradleTestKit() |
|
20 | testImplementation gradleTestKit() | |
| 21 | testImplementation "org.junit.jupiter:junit-jupiter-api:5.11.4" |
|
21 | testImplementation "org.junit.jupiter:junit-jupiter-api:5.11.4" | |
| 22 | testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.11.4" |
|
22 | testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.11.4" | |
|
|
23 | testRuntimeOnly "org.junit.platform:junit-platform-launcher:1.11.4" | |||
| 23 | } |
|
24 | } | |
| 24 |
|
25 | |||
| 25 | task printVersion{ |
|
26 | task printVersion{ | |
| 26 | doLast { |
|
27 | doLast { | |
| 27 | println "project: $project.group:$project.name:$project.version" |
|
28 | println "project: $project.group:$project.name:$project.version" | |
| 28 | println "jar: ${->jar.archiveFileName.get()}" |
|
29 | println "jar: ${->jar.archiveFileName.get()}" | |
| 29 | } |
|
30 | } | |
| 30 | } |
|
31 | } | |
| 31 |
|
32 | |||
| 32 | test { |
|
33 | test { | |
| 33 | useJUnitPlatform() |
|
34 | useJUnitPlatform() | |
| 34 | } |
|
35 | } | |
| 35 |
|
36 | |||
| 36 | publishing { |
|
37 | publishing { | |
| 37 | repositories { |
|
38 | repositories { | |
| 38 | ivy { |
|
39 | ivy { | |
| 39 | url "${System.properties["user.home"]}/ivy-repo" |
|
40 | url "${System.properties["user.home"]}/ivy-repo" | |
| 40 | } |
|
41 | } | |
| 41 | } |
|
42 | } | |
| 42 | publications { |
|
43 | publications { | |
| 43 | ivy(IvyPublication) { |
|
44 | ivy(IvyPublication) { | |
| 44 | from components.java |
|
45 | from components.java | |
| 45 | descriptor.description { |
|
46 | descriptor.description { | |
| 46 | text = providers.provider({ description }) |
|
47 | text = providers.provider({ description }) | |
| 47 | } |
|
48 | } | |
| 48 | } |
|
49 | } | |
| 49 | } |
|
50 | } | |
| 50 | } |
|
51 | } | |
General Comments 0
You need to be logged in to leave comments.
Login now
