mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-04-02 13:37:45 -05:00
@@ -14,7 +14,7 @@ import org.gradle.util.GradleVersion;
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public class LoomGradlePluginBootstrap implements Plugin<PluginAware> {
|
||||
private static final String MIN_SUPPORTED_GRADLE_VERSION = "8.8";
|
||||
private static final String MIN_SUPPORTED_GRADLE_VERSION = "8.10";
|
||||
private static final int MIN_SUPPORTED_MAJOR_JAVA_VERSION = 17;
|
||||
private static final int MIN_SUPPORTED_MAJOR_IDEA_VERSION = 2021;
|
||||
|
||||
|
||||
@@ -63,7 +63,11 @@ if (ENV.BUILD_NUMBER) {
|
||||
}
|
||||
|
||||
// We must build against the version of Kotlin Gradle ships with.
|
||||
def kotlinVersion = KotlinDslVersion.current().getKotlinVersion()
|
||||
def props = new Properties()
|
||||
Project.class.getClassLoader().getResource("gradle-kotlin-dsl-versions.properties").openStream().withCloseable {
|
||||
props.load(it)
|
||||
}
|
||||
def kotlinVersion = props.getProperty("kotlin")
|
||||
if (libs.versions.kotlin.get() != kotlinVersion) {
|
||||
throw new IllegalStateException("Requires Kotlin version: ${kotlinVersion}")
|
||||
}
|
||||
@@ -306,7 +310,6 @@ tasks.withType(Test).configureEach {
|
||||
|
||||
|
||||
import org.gradle.api.internal.artifacts.configurations.ConfigurationRoles
|
||||
import org.gradle.launcher.cli.KotlinDslVersion
|
||||
import org.gradle.util.GradleVersion
|
||||
import org.w3c.dom.Document
|
||||
import org.w3c.dom.Element
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[versions]
|
||||
kotlin = "1.9.22"
|
||||
kotlin = "1.9.24"
|
||||
asm = "9.6"
|
||||
commons-io = "2.15.1"
|
||||
gson = "2.10.1"
|
||||
|
||||
@@ -6,7 +6,7 @@ mockito = "5.12.0"
|
||||
java-debug = "0.52.0"
|
||||
mixin = "0.12.5+mixin.0.8.5"
|
||||
|
||||
gradle-nightly = "8.10-20240613003017+0000"
|
||||
gradle-nightly = "8.11-20240814172604+0000"
|
||||
fabric-loader = "0.15.11"
|
||||
fabric-installer = "1.0.1"
|
||||
|
||||
|
||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-all.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
5
gradlew
vendored
5
gradlew
vendored
@@ -15,6 +15,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
@@ -84,7 +86,8 @@ done
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
||||
' "$PWD" ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
2
gradlew.bat
vendored
2
gradlew.bat
vendored
@@ -13,6 +13,8 @@
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
@rem SPDX-License-Identifier: Apache-2.0
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
|
||||
@@ -39,7 +39,7 @@ import org.gradle.internal.remote.internal.inet.InetAddressFactory
|
||||
import org.gradle.internal.service.ServiceRegistry
|
||||
import org.gradle.invocation.DefaultGradle
|
||||
import org.gradle.jvm.toolchain.JavaLanguageVersion
|
||||
import org.gradle.launcher.daemon.configuration.DaemonParameters
|
||||
import org.gradle.launcher.daemon.configuration.DaemonPriority
|
||||
import org.gradle.launcher.daemon.context.DefaultDaemonContext
|
||||
import org.gradle.launcher.daemon.protocol.DaemonMessageSerializer
|
||||
import org.gradle.launcher.daemon.protocol.Finished
|
||||
@@ -52,7 +52,7 @@ import org.gradle.launcher.daemon.server.DaemonTcpServerConnector
|
||||
import org.gradle.launcher.daemon.server.DefaultDaemonConnection
|
||||
import org.gradle.launcher.daemon.server.IncomingConnectionHandler
|
||||
import org.gradle.launcher.daemon.server.SynchronizedDispatchConnection
|
||||
import org.gradle.launcher.daemon.server.api.DaemonStateControl
|
||||
import org.gradle.launcher.daemon.server.api.DaemonState
|
||||
import org.gradle.util.GradleVersion
|
||||
|
||||
import net.fabricmc.loom.util.gradle.daemon.DaemonUtils
|
||||
@@ -78,7 +78,7 @@ class TestPlugin implements Plugin<Project> {
|
||||
|
||||
// Write it in the registry
|
||||
def registry = new PersistentDaemonRegistry(registryBin.toFile(), services.get(FileLockManager.class), services.get(Chmod.class))
|
||||
def daemonInfo = new DaemonInfo(address, createDaemonContext(), "token".bytes, DaemonStateControl.State.Busy)
|
||||
def daemonInfo = new DaemonInfo(address, createDaemonContext(), "token".bytes, DaemonState.Busy)
|
||||
registry.store(daemonInfo)
|
||||
|
||||
// When we get a connection, wait for a stop message and process it by responding with a success message
|
||||
@@ -99,36 +99,19 @@ class TestPlugin implements Plugin<Project> {
|
||||
}
|
||||
}
|
||||
|
||||
// Thanks groovy for allowing me to do this :D
|
||||
static DefaultDaemonContext createDaemonContext() {
|
||||
int constructorArgsCount = DefaultDaemonContext.class.getConstructors()[0].getParameterCount()
|
||||
|
||||
if (constructorArgsCount == 10) {
|
||||
// Gradle 8.9+ adds a JavaVersion and NativeServicesMode parameter to the constructor
|
||||
//noinspection GroovyAssignabilityCheck
|
||||
return new DefaultDaemonContext(
|
||||
UUID.randomUUID().toString(),
|
||||
new File("."),
|
||||
JavaLanguageVersion.current(),
|
||||
new File("."),
|
||||
ProcessHandle.current().pid(),
|
||||
0,
|
||||
List.of(),
|
||||
false,
|
||||
NativeServices.NativeServicesMode.NOT_SET,
|
||||
DaemonParameters.Priority.NORMAL
|
||||
)
|
||||
}
|
||||
|
||||
return new DefaultDaemonContext(
|
||||
UUID.randomUUID().toString(),
|
||||
new File("."),
|
||||
JavaLanguageVersion.current(),
|
||||
"",
|
||||
new File("."),
|
||||
ProcessHandle.current().pid(),
|
||||
0,
|
||||
List.of(),
|
||||
false,
|
||||
DaemonParameters.Priority.NORMAL
|
||||
NativeServices.NativeServicesMode.NOT_SET,
|
||||
DaemonPriority.NORMAL
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user