@@ -4,112 +4,112 @@ import org.gradle.api.tasks.bundling.AbstractArchiveTask;
44import org.gradle.api.tasks.bundling.Jar ;
55
66plugins {
7- id(" java-library" )
8- id(" maven-publish" )
9- id(" signing" )
7+ id(" java-library" )
8+ id(" maven-publish" )
9+ id(" signing" )
1010}
1111
1212group = " io.github.jbock-java"
1313
1414compileJava {
15- options. encoding = " UTF-8"
15+ options. encoding = " UTF-8"
1616}
1717
1818java {
1919 withSourcesJar()
2020 withJavadocJar()
21- sourceCompatibility = JavaVersion . VERSION_11
22- targetCompatibility = JavaVersion . VERSION_11
21+ sourceCompatibility = JavaVersion . VERSION_11
22+ targetCompatibility = JavaVersion . VERSION_11
2323}
2424
2525tasks. named(" javadoc" ) {
26- options. encoding = " UTF-8"
26+ options. encoding = " UTF-8"
2727}
2828
2929repositories {
30- mavenCentral()
30+ mavenCentral()
3131}
3232
3333tasks. withType(AbstractArchiveTask ) {
34- preserveFileTimestamps = false
35- reproducibleFileOrder = true
34+ preserveFileTimestamps = false
35+ reproducibleFileOrder = true
3636}
3737
3838tasks. withType(GenerateModuleMetadata ) {
39- enabled = true
39+ enabled = true
4040}
4141
4242dependencies {
43- api(" io.github.jbock-java:either:1.5.2" )
44- testImplementation platform(" org.junit:junit-bom:5.12.2" )
45- testImplementation(" org.junit.jupiter:junit-jupiter" )
46- testImplementation(" org.mockito:mockito-core:5.16.1" )
43+ api(" io.github.jbock-java:either:1.5.2" )
44+ testImplementation platform(" org.junit:junit-bom:5.12.2" )
45+ testImplementation(" org.junit.jupiter:junit-jupiter" )
46+ testImplementation(" org.mockito:mockito-core:5.16.1" )
4747}
4848
4949jar {
50- manifest {
51- attributes(
52- " Implementation-Version" : project. properties[" version" ]
53- )
54- }
50+ manifest {
51+ attributes(
52+ " Implementation-Version" : project. properties[" version" ]
53+ )
54+ }
5555}
5656
5757tasks. named(" test" ) {
58- useJUnitPlatform()
58+ useJUnitPlatform()
5959}
6060
6161// https://central.sonatype.org/pages/gradle.html
6262publishing {
63- publications {
64- mavenJava(MavenPublication ) {
65- artifactId = " jbock"
66- from components. java
67-
68- artifact sourcesJar
69- artifact javadocJar
70-
71- pom {
72- name = " jbock"
73- packaging = " jar"
74- description = " jbock annotations and utils"
75- url = " https://github.com/jbock-java/jbock"
76-
77- licenses {
78- license {
79- name = " MIT License"
80- url = " https://opensource.org/licenses/MIT"
81- }
82- }
83- developers {
84- developer {
85- id = " Various"
86- name = " Various"
87- 88- }
89- }
90- scm {
91- connection = " scm:git:https://github.com/jbock-java/jbock.git"
92- developerConnection = " scm:git:https://github.com/jbock-java/jbock.git"
93- url = " https://github.com/jbock-java/jbock"
94- }
95- }
96- }
97- }
98- repositories {
99- maven {
100- url = " https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
101- credentials {
102- username = System . getenv(" OSS_USER" )
103- password = System . getenv(" OSS_PASS" )
104- }
105- }
106- }
63+ publications {
64+ mavenJava(MavenPublication ) {
65+ artifactId = " jbock"
66+ from components. java
67+
68+ artifact sourcesJar
69+ artifact javadocJar
70+
71+ pom {
72+ name = " jbock"
73+ packaging = " jar"
74+ description = " jbock annotations and utils"
75+ url = " https://github.com/jbock-java/jbock"
76+
77+ licenses {
78+ license {
79+ name = " MIT License"
80+ url = " https://opensource.org/licenses/MIT"
81+ }
82+ }
83+ developers {
84+ developer {
85+ id = " Various"
86+ name = " Various"
87+ 88+ }
89+ }
90+ scm {
91+ connection = " scm:git:https://github.com/jbock-java/jbock.git"
92+ developerConnection = " scm:git:https://github.com/jbock-java/jbock.git"
93+ url = " https://github.com/jbock-java/jbock"
94+ }
95+ }
96+ }
97+ }
98+ repositories {
99+ maven {
100+ url = " https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
101+ credentials {
102+ username = System . getenv(" OSS_USER" )
103+ password = System . getenv(" OSS_PASS" )
104+ }
105+ }
106+ }
107107}
108108
109109// https://docs.gradle.org/current/userguide/signing_plugin.html
110110signing {
111- def signingKey = findProperty(" signingKey" )
112- def signingPassword = findProperty(" signingPassword" )
113- useInMemoryPgpKeys(signingKey, signingPassword)
114- sign publishing. publications. mavenJava
111+ def signingKey = findProperty(" signingKey" )
112+ def signingPassword = findProperty(" signingPassword" )
113+ useInMemoryPgpKeys(signingKey, signingPassword)
114+ sign publishing. publications. mavenJava
115115}
0 commit comments