@@ -4,132 +4,132 @@ import org.gradle.api.tasks.bundling.AbstractArchiveTask;
44import org.gradle.api.tasks.bundling.Jar ;
55
66plugins {
7- id(" java" )
8- id(" maven-publish" )
9- id(" com.gradleup.shadow" ) version(" 8.3.6" )
10- id(" signing" )
7+ id(" java" )
8+ id(" maven-publish" )
9+ id(" com.gradleup.shadow" ) version(" 8.3.6" )
10+ id(" signing" )
1111}
1212
1313group = " io.github.jbock-java"
1414
1515compileJava {
16- options. encoding = " UTF-8"
16+ options. encoding = " UTF-8"
1717}
1818
1919// https://stackoverflow.com/questions/21904269/configure-gradle-to-publish-sources-and-javadoc
2020java {
2121 withSourcesJar()
2222 withJavadocJar()
23- sourceCompatibility = JavaVersion . VERSION_11
24- targetCompatibility = JavaVersion . VERSION_11
23+ sourceCompatibility = JavaVersion . VERSION_11
24+ targetCompatibility = JavaVersion . VERSION_11
2525}
2626
2727tasks. named(" javadoc" ) {
28- options. encoding = " UTF-8"
28+ options. encoding = " UTF-8"
2929}
3030
3131repositories {
32- mavenCentral()
32+ mavenCentral()
3333}
3434
3535tasks. withType(AbstractArchiveTask ). configureEach {
36- preserveFileTimestamps = false
37- reproducibleFileOrder = true
36+ preserveFileTimestamps = false
37+ reproducibleFileOrder = true
3838}
3939
4040tasks. withType(GenerateModuleMetadata ). configureEach {
41- enabled = true
41+ enabled = true
4242}
4343
4444tasks. named(" shadowJar" ) {
45- minimize()
46- archiveClassifier. set(" " )
47- relocate(" io.jbock.auto.common" , " io.jbock.jbock.auto.common" )
48- relocate(" io.jbock.javapoet" , " io.jbock.jbock.javapoet" )
45+ minimize()
46+ archiveClassifier. set(" " )
47+ relocate(" io.jbock.auto.common" , " io.jbock.jbock.auto.common" )
48+ relocate(" io.jbock.javapoet" , " io.jbock.jbock.javapoet" )
4949}
5050
5151dependencies {
52- var jbock = project(" :jbock" )
53- var simple_component = " io.github.jbock-java:simple-component:1.024"
54- var javapoet = " io.github.jbock-java:javapoet:1.15"
55- implementation(javapoet)
56- implementation(" io.github.jbock-java:auto-common:1.2.3" )
57- shadow(jbock)
58- compileOnly(simple_component)
59- annotationProcessor(" io.github.jbock-java:simple-component-compiler:1.024" )
60- testRuntimeOnly(" org.junit.platform:junit-platform-launcher" )
61- testImplementation(" io.github.jbock-java:compile-testing:0.19.12" )
62- testImplementation platform(" org.junit:junit-bom:5.12.2" )
63- testImplementation(" org.junit.jupiter:junit-jupiter" )
64- testImplementation(" org.mockito:mockito-core:5.16.1" )
65- testImplementation(jbock)
66- testImplementation(simple_component)
52+ var jbock = project(" :jbock" )
53+ var simple_component = " io.github.jbock-java:simple-component:1.024"
54+ var javapoet = " io.github.jbock-java:javapoet:1.15"
55+ implementation(javapoet)
56+ implementation(" io.github.jbock-java:auto-common:1.2.3" )
57+ shadow(jbock)
58+ compileOnly(simple_component)
59+ annotationProcessor(" io.github.jbock-java:simple-component-compiler:1.024" )
60+ testRuntimeOnly(" org.junit.platform:junit-platform-launcher" )
61+ testImplementation(" io.github.jbock-java:compile-testing:0.19.12" )
62+ testImplementation platform(" org.junit:junit-bom:5.12.2" )
63+ testImplementation(" org.junit.jupiter:junit-jupiter" )
64+ testImplementation(" org.mockito:mockito-core:5.16.1" )
65+ testImplementation(jbock)
66+ testImplementation(simple_component)
6767}
6868
6969tasks. named(" jar" ) {
70- manifest {
71- attributes(
72- " Implementation-Version" : project. properties[" version" ]
73- )
74- }
70+ manifest {
71+ attributes(
72+ " Implementation-Version" : project. properties[" version" ]
73+ )
74+ }
7575}
7676
7777tasks. named(" test" ) {
78- useJUnitPlatform()
78+ useJUnitPlatform()
7979}
8080
8181// https://central.sonatype.org/pages/gradle.html
8282publishing {
83- publications {
84- shadow(MavenPublication ) { publication ->
85- project. shadow. component(publication)
86- artifactId = " jbock-compiler"
87-
88- artifact sourcesJar
89- artifact javadocJar
90-
91- pom {
92- name = " jbock-compiler"
93- packaging = " jar"
94- description = " jbock annotation processor"
95- url = " https://github.com/jbock-java/jbock"
96-
97- licenses {
98- license {
99- name = " MIT License"
100- url = " https://opensource.org/licenses/MIT"
101- }
102- }
103- developers {
104- developer {
105- id = " Various"
106- name = " Various"
107- 108- }
109- }
110- scm {
111- connection = " scm:git:https://github.com/jbock-java/jbock.git"
112- developerConnection = " scm:git:https://github.com/jbock-java/jbock.git"
113- url = " https://github.com/jbock-java/jbock"
114- }
115- }
116- }
117- }
118- repositories {
119- maven {
120- url = " https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
121- credentials {
122- username = System . getenv(" OSS_USER" )
123- password = System . getenv(" OSS_PASS" )
124- }
125- }
126- }
83+ publications {
84+ shadow(MavenPublication ) { publication ->
85+ project. shadow. component(publication)
86+ artifactId = " jbock-compiler"
87+
88+ artifact sourcesJar
89+ artifact javadocJar
90+
91+ pom {
92+ name = " jbock-compiler"
93+ packaging = " jar"
94+ description = " jbock annotation processor"
95+ url = " https://github.com/jbock-java/jbock"
96+
97+ licenses {
98+ license {
99+ name = " MIT License"
100+ url = " https://opensource.org/licenses/MIT"
101+ }
102+ }
103+ developers {
104+ developer {
105+ id = " Various"
106+ name = " Various"
107+ 108+ }
109+ }
110+ scm {
111+ connection = " scm:git:https://github.com/jbock-java/jbock.git"
112+ developerConnection = " scm:git:https://github.com/jbock-java/jbock.git"
113+ url = " https://github.com/jbock-java/jbock"
114+ }
115+ }
116+ }
117+ }
118+ repositories {
119+ maven {
120+ url = " https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
121+ credentials {
122+ username = System . getenv(" OSS_USER" )
123+ password = System . getenv(" OSS_PASS" )
124+ }
125+ }
126+ }
127127}
128128
129129// https://docs.gradle.org/current/userguide/signing_plugin.html
130130signing {
131- def signingKey = findProperty(" signingKey" )
132- def signingPassword = findProperty(" signingPassword" )
133- useInMemoryPgpKeys(signingKey, signingPassword)
134- sign publishing. publications. shadow
131+ def signingKey = findProperty(" signingKey" )
132+ def signingPassword = findProperty(" signingPassword" )
133+ useInMemoryPgpKeys(signingKey, signingPassword)
134+ sign publishing. publications. shadow
135135}
0 commit comments