Skip to content

Commit 68965d7

Browse files
authored
Adjust publishing for new Central endpoint (#490)
* chore(build): Adjust publishing for new Central endpoint * chore(build): Bump test-only deps, use lazy task realization in a few places * chore(build): gradle 9.0.0
1 parent cd60d64 commit 68965d7

10 files changed

Lines changed: 22 additions & 27 deletions

File tree

build.gradle

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import java.time.Duration
77

88
plugins {
99
id 'jacoco'
10-
id 'com.gradleup.shadow' version '8.3.0'
10+
id 'com.gradleup.shadow' version '8.3.8'
1111
id 'org.jetbrains.kotlin.jvm' version '2.0.0'
12-
id("io.github.gradle-nexus.publish-plugin") version '2.0.0'
12+
id 'io.github.gradle-nexus.publish-plugin' version '2.0.0'
1313
}
1414

1515
apply plugin: 'jacoco'
@@ -208,13 +208,8 @@ testFixturesJar {
208208
destinationDirectory = file("$rootDir/build/extralibs")
209209
}
210210

211-
task sourceJar(type:Jar) {
212-
archiveClassifier = "sources"
213-
from sourceSets.main.allSource
214-
}
215-
216-
tasks.withType(Javadoc) {
217-
failOnError false
211+
tasks.withType(Javadoc).configureEach {
212+
failOnError = false
218213
include 'org/jetbrains/java/decompiler/api/**'
219214
include 'org/jetbrains/java/decompiler/main/extern/**'
220215
options.addStringOption('Xdoclint:none', '-quiet')
@@ -227,7 +222,7 @@ java {
227222
withJavadocJar()
228223
}
229224

230-
tasks.withType(Jar) {
225+
tasks.withType(Jar).configureEach {
231226
reproducibleFileOrder = true
232227
preserveFileTimestamps = false
233228
}
@@ -314,8 +309,8 @@ nexusPublishing {
314309
username = ENV.SONATYPE_USER
315310
password = ENV.SONATYPE_PASS
316311

317-
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
318-
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
312+
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
313+
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
319314
}
320315
}
321316

buildSrc/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ repositories {
88
}
99

1010
dependencies {
11+
implementation gradleApi()
1112
implementation 'org.openjdk.asmtools:asmtools-core:7.0.b10-ea'
1213
}

buildSrc/src/main/java/org/vineflower/build/JasmCompile.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import java.util.ArrayList;
1515
import java.util.List;
1616

17-
public class JasmCompile extends SourceTask {
17+
public abstract class JasmCompile extends SourceTask {
1818
private final DirectoryProperty destinationDirectory = this.getProject().getObjects().directoryProperty();
1919
private final JasmCompileOptions compileOptions = this.getProject().getObjects().newInstance(JasmCompileOptions.class);
2020

buildSrc/src/main/java/org/vineflower/build/JasmCompileOptions.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
package org.vineflower.build;
22

3+
import java.io.Serializable;
34
import org.gradle.api.tasks.Input;
4-
import org.gradle.api.tasks.compile.AbstractOptions;
55

66
import java.util.ArrayList;
77
import java.util.List;
88

9-
public class JasmCompileOptions extends AbstractOptions {
9+
public class JasmCompileOptions implements Serializable {
1010
private List<String> compilerArgs = new ArrayList<>();
1111

1212
@Input

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ kotlin.stdlib.default.dependency = false
22

33
# Dependencies for Gradle
44
groovy=3.0.9
5-
hamcrest=2.2
6-
junit_bom=5.9.2
5+
hamcrest=3.0
6+
junit_bom=5.13.4
77
scala_library=3.2.2

gradle/wrapper/gradle-wrapper.jar

1.83 KB
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 5 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradlew.bat

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pluginManagement {
66
}
77

88
plugins {
9-
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.8.0'
9+
id 'org.gradle.toolchains.foojay-resolver-convention' version '1.0.0'
1010
}
1111

1212
rootProject.name = 'vineflower'

0 commit comments

Comments
 (0)