Skip to content

Commit 88112ea

Browse files
committed
build.gradle updated
Gradle updated to 8.2
1 parent d0a87be commit 88112ea

File tree

10 files changed

+178
-164
lines changed

10 files changed

+178
-164
lines changed

build.gradle

Lines changed: 147 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,59 @@
1+
buildscript {
2+
dependencies {
3+
classpath "com.diffplug.spotless:spotless-plugin-gradle:6.19.0"
4+
}
5+
}
6+
17
plugins {
8+
id "base"
29
id "jacoco"
3-
id "java-library"
4-
id "maven-publish"
10+
id "jacoco-report-aggregation"
11+
id "org.sonarqube" version "4.2.1.3168"
12+
id "io.github.gradle-nexus.publish-plugin" version "1.3.0"
13+
}
514

6-
id "com.diffplug.spotless" version "6.12.0"
15+
sonarqube {
16+
properties {
17+
property "sonar.host.url", "https://sonarcloud.io"
18+
property "sonar.organization", "goodforgod"
19+
property "sonar.projectKey", "GoodforGod_$artifactRootId"
20+
property "sonar.coverage.jacoco.xmlReportPaths", "build/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml"
21+
}
722
}
823

9-
group = groupId
10-
version = artifactVersion
24+
dependencies {
25+
jacocoAggregation project(":graalvm-hint-annotations")
26+
jacocoAggregation project(":graalvm-hint-processor")
27+
}
1128

12-
subprojects {
13-
apply plugin: "jacoco"
14-
apply plugin: "java-library"
15-
apply plugin: "maven-publish"
16-
apply plugin: "com.diffplug.spotless"
29+
reporting {
30+
reports {
31+
testCodeCoverageReport(JacocoCoverageReport) {
32+
testType = TestSuiteType.UNIT_TEST
33+
}
34+
}
35+
}
36+
37+
allprojects {
38+
group = groupId
39+
var ver = System.getenv().getOrDefault("RELEASE_VERSION", artifactVersion)
40+
version = ver.startsWith("v") ? ver.substring(1) : ver
1741

1842
repositories {
1943
mavenLocal()
2044
mavenCentral()
2145
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
2246
}
47+
}
2348

24-
group = groupId
25-
version = artifactVersion
49+
subprojects {
50+
apply plugin: "jacoco"
51+
apply plugin: "java-library"
52+
apply plugin: "com.diffplug.spotless"
2653

2754
sourceCompatibility = JavaVersion.VERSION_11
2855
targetCompatibility = JavaVersion.VERSION_11
2956

30-
spotless {
31-
java {
32-
encoding("UTF-8")
33-
importOrder()
34-
removeUnusedImports()
35-
eclipse("4.21.0").configFile("${rootDir}/config/codestyle.xml")
36-
}
37-
}
38-
3957
test {
4058
useJUnitPlatform()
4159
testLogging {
@@ -44,12 +62,20 @@ subprojects {
4462
}
4563

4664
reports {
47-
html.enabled(false)
48-
junitXml.enabled(false)
65+
html.required = false
66+
junitXml.required = false
67+
}
68+
}
69+
70+
spotless {
71+
java {
72+
encoding("UTF-8")
73+
importOrder()
74+
removeUnusedImports()
75+
eclipse("4.21").configFile("${rootDir}/config/codestyle.xml")
4976
}
5077
}
5178

52-
jar.enabled(true)
5379

5480
tasks.withType(JavaCompile) {
5581
options.encoding("UTF-8")
@@ -60,7 +86,7 @@ subprojects {
6086
check.dependsOn jacocoTestReport
6187
jacocoTestReport {
6288
reports {
63-
xml.enabled true
89+
xml.required = true
6490
html.destination file("${buildDir}/jacocoHtml")
6591
}
6692
}
@@ -71,4 +97,100 @@ subprojects {
7197
options.addBooleanOption("html5", true)
7298
}
7399
}
100+
}
101+
102+
nexusPublishing {
103+
packageGroup = groupId
104+
repositories {
105+
sonatype {
106+
username = System.getenv("OSS_USERNAME")
107+
password = System.getenv("OSS_PASSWORD")
108+
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
109+
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
110+
}
111+
}
112+
}
113+
114+
subprojects {
115+
apply plugin: "maven-publish"
116+
apply plugin: "org.sonarqube"
117+
118+
sonarqube {
119+
properties {
120+
property "sonar.host.url", "https://sonarcloud.io"
121+
property "sonar.organization", "goodforgod"
122+
property "sonar.projectKey", "GoodforGod_$artifactRootId"
123+
}
124+
}
125+
126+
publishing {
127+
publications {
128+
mavenJava(MavenPublication) {
129+
from components.java
130+
artifactId = "$artifactRootId-${project.name}"
131+
132+
var artifactName = artifactId
133+
pom {
134+
url = "https://github.com/GoodforGod/$artifactRootId"
135+
name = artifactName
136+
description = "Annotation Processors that generate GraalVM configuration hints for native-image applications."
137+
138+
license {
139+
name = "Apache License 2.0"
140+
url = "https://github.com/GoodforGod/$artifactRootId/blob/master/LICENSE"
141+
distribution = "repo"
142+
}
143+
144+
developer {
145+
id = "GoodforGod"
146+
name = "Anton Kurako"
147+
email = "goodforgod.dev@gmail.com"
148+
url = "https://github.com/GoodforGod"
149+
}
150+
151+
scm {
152+
connection = "scm:git:git://github.com/GoodforGod/${artifactRootId}.git"
153+
developerConnection = "scm:git:ssh://GoodforGod/${artifactRootId}.git"
154+
url = "https://github.com/GoodforGod/$artifactRootId/tree/master"
155+
}
156+
}
157+
}
158+
}
159+
repositories {
160+
maven {
161+
def releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2"
162+
def snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
163+
url = version.endsWith("SNAPSHOT") ? snapshotsRepoUrl : releasesRepoUrl
164+
credentials {
165+
username System.getenv("OSS_USERNAME")
166+
password System.getenv("OSS_PASSWORD")
167+
}
168+
}
169+
if (!version.endsWith("SNAPSHOT")) {
170+
maven {
171+
name = "GitHubPackages"
172+
url = "https://maven.pkg.github.com/GoodforGod/$artifactRootId"
173+
credentials {
174+
username = System.getenv("GITHUB_ACTOR")
175+
password = System.getenv("GITHUB_TOKEN")
176+
}
177+
}
178+
}
179+
}
180+
}
181+
182+
java {
183+
withJavadocJar()
184+
withSourcesJar()
185+
}
186+
187+
if (project.hasProperty("signingKey")) {
188+
apply plugin: "signing"
189+
signing {
190+
def signingKey = findProperty("signingKey")
191+
def signingPassword = findProperty("signingPassword")
192+
useInMemoryPgpKeys(signingKey, signingPassword)
193+
sign publishing.publications.mavenJava
194+
}
195+
}
74196
}
Lines changed: 1 addition & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,3 @@
1-
publishing {
2-
publications {
3-
mavenJava(MavenPublication) {
4-
from components.java
1+
dependencies {
52

6-
pom {
7-
name = "GraalVM Hint Annotations"
8-
url = "https://github.com/GoodforGod/$artifactRootId"
9-
description = "Annotations that help marking GraalVM native-image hints for GraalVM Hint Processor."
10-
11-
license {
12-
name = "Apache License 2.0"
13-
url = "https://github.com/GoodforGod/$artifactRootId/blob/master/LICENSE"
14-
distribution = "repo"
15-
}
16-
17-
developer {
18-
id = "GoodforGod"
19-
name = "Anton Kurako"
20-
email = "goodforgod.dev@gmail.com"
21-
url = "https://github.com/GoodforGod"
22-
}
23-
24-
scm {
25-
connection = "scm:git:git://github.com/GoodforGod/${artifactRootId}.git"
26-
developerConnection = "scm:git:ssh://GoodforGod/${artifactRootId}.git"
27-
url = "https://github.com/GoodforGod/$artifactRootId/tree/master"
28-
}
29-
}
30-
}
31-
}
32-
repositories {
33-
maven {
34-
def releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2"
35-
def snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
36-
url = version.endsWith("SNAPSHOT") ? snapshotsRepoUrl : releasesRepoUrl
37-
credentials {
38-
username System.getenv("OSS_USERNAME")
39-
password System.getenv("OSS_PASSWORD")
40-
}
41-
}
42-
}
43-
}
44-
45-
java {
46-
withJavadocJar()
47-
withSourcesJar()
48-
}
49-
50-
if (project.hasProperty("signing.keyId")) {
51-
apply plugin: "signing"
52-
signing {
53-
sign publishing.publications.mavenJava
54-
}
553
}

graalvm-hint-annotations/gradle.properties

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 4 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,9 @@
1-
plugins {
2-
id "org.sonarqube" version "3.3"
3-
}
4-
51
dependencies {
62
implementation project(":graalvm-hint-annotations")
73

8-
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.8.2"
9-
testImplementation "org.junit.jupiter:junit-jupiter-api:5.8.2"
10-
testImplementation "org.junit.jupiter:junit-jupiter-params:5.8.2"
11-
12-
testImplementation "com.google.testing.compile:compile-testing:0.19"
13-
}
14-
15-
sonarqube {
16-
properties {
17-
property "sonar.host.url", "https://sonarcloud.io"
18-
property "sonar.organization", "goodforgod"
19-
property "sonar.projectKey", "GoodforGod_$artifactRootId"
20-
}
21-
}
22-
23-
publishing {
24-
publications {
25-
mavenJava(MavenPublication) {
26-
from components.java
27-
28-
pom {
29-
name = "GraalVM Hint Processor"
30-
url = "https://github.com/GoodforGod/$artifactRootId"
31-
description = "Annotation Processors that generate GraalVM configuration hints for native-image applications."
32-
33-
license {
34-
name = "Apache License 2.0"
35-
url = "https://github.com/GoodforGod/$artifactRootId/blob/master/LICENSE"
36-
distribution = "repo"
37-
}
38-
39-
developer {
40-
id = "GoodforGod"
41-
name = "Anton Kurako"
42-
email = "goodforgod.dev@gmail.com"
43-
url = "https://github.com/GoodforGod"
44-
}
45-
46-
scm {
47-
connection = "scm:git:git://github.com/GoodforGod/${artifactRootId}.git"
48-
developerConnection = "scm:git:ssh://GoodforGod/${artifactRootId}.git"
49-
url = "https://github.com/GoodforGod/$artifactRootId/tree/master"
50-
}
51-
}
52-
}
53-
}
54-
repositories {
55-
maven {
56-
def releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2"
57-
def snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
58-
url = version.endsWith("SNAPSHOT") ? snapshotsRepoUrl : releasesRepoUrl
59-
credentials {
60-
username System.getenv("OSS_USERNAME")
61-
password System.getenv("OSS_PASSWORD")
62-
}
63-
}
64-
}
65-
}
66-
67-
java {
68-
withJavadocJar()
69-
withSourcesJar()
70-
}
4+
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.9.3"
5+
testImplementation "org.junit.jupiter:junit-jupiter-api:5.9.3"
6+
testImplementation "org.junit.jupiter:junit-jupiter-params:5.9.3"
717

72-
if (project.hasProperty("signing.keyId")) {
73-
apply plugin: "signing"
74-
signing {
75-
sign publishing.publications.mavenJava
76-
}
8+
testImplementation "com.google.testing.compile:compile-testing:0.21.0"
779
}

graalvm-hint-processor/gradle.properties

Lines changed: 0 additions & 1 deletion
This file was deleted.

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
groupId=io.goodforgod
22
artifactRootId=graalvm-hint
3-
artifactVersion=1.0.0
3+
artifactVersion=1.0.0-SNAPSHOT
44

55

66
##### GRADLE #####

gradle/wrapper/gradle-wrapper.jar

1.99 KB
Binary file not shown.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
4+
networkTimeout=10000
45
zipStoreBase=GRADLE_USER_HOME
56
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)