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

File tree

10 files changed

+22
-27
lines changed

10 files changed

+22
-27
lines changed

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
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
#
4-
# Copyright © 2015-2021 the original authors.
4+
# Copyright © 2015 the original authors.
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.
@@ -86,8 +86,7 @@ done
8686
# shellcheck disable=SC2034
8787
APP_BASE_NAME=${0##*/}
8888
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
89-
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
90-
' "$PWD" ) || exit
89+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
9190

9291
# Use the maximum available, or set MAX_FD != -1 to use that value.
9392
MAX_FD=maximum
@@ -115,7 +114,7 @@ case "$( uname )" in #(
115114
NONSTOP* ) nonstop=true ;;
116115
esac
117116

118-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
117+
CLASSPATH="\\\"\\\""
119118

120119

121120
# Determine the Java command to use to start the JVM.
@@ -206,15 +205,15 @@ fi
206205
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
207206

208207
# Collect all arguments for the java command:
209-
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
208+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
210209
# and any embedded shellness will be escaped.
211210
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
212211
# treated as '${Hostname}' itself on the command line.
213212

214213
set -- \
215214
"-Dorg.gradle.appname=$APP_BASE_NAME" \
216215
-classpath "$CLASSPATH" \
217-
org.gradle.wrapper.GradleWrapperMain \
216+
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
218217
"$@"
219218

220219
# Stop when "xargs" is not available.

gradlew.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ goto fail
7070
:execute
7171
@rem Setup the command line
7272

73-
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73+
set CLASSPATH=
7474

7575

7676
@rem Execute Gradle
77-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
77+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
7878

7979
:end
8080
@rem End local scope for the variables with windows NT shell

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)