Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-25 10:30:04 +01:00
Restructure how Loom is included in build env
Dieser Commit ist enthalten in:
Ursprung
e77393a51e
Commit
445b7706fc
@ -1,3 +1,5 @@
|
||||
import java.util.Properties
|
||||
|
||||
plugins {
|
||||
`kotlin-dsl`
|
||||
kotlin("jvm") version embeddedKotlinVersion
|
||||
@ -10,6 +12,14 @@ repositories {
|
||||
name = "Forge Maven"
|
||||
url = uri("https://files.minecraftforge.net/maven")
|
||||
}
|
||||
maven {
|
||||
name = "Fabric"
|
||||
url = uri("https://maven.fabricmc.net/")
|
||||
}
|
||||
maven {
|
||||
name = "sponge"
|
||||
url = uri("https://repo.spongepowered.org/maven")
|
||||
}
|
||||
}
|
||||
|
||||
configurations.all {
|
||||
@ -23,6 +33,14 @@ configurations.all {
|
||||
}
|
||||
}
|
||||
|
||||
val properties = Properties().also { props ->
|
||||
project.projectDir.resolveSibling("gradle.properties").bufferedReader().use {
|
||||
props.load(it)
|
||||
}
|
||||
}
|
||||
val loomVersion: String = properties.getProperty("loom.version")
|
||||
val mixinVersion: String = properties.getProperty("mixin.version")
|
||||
|
||||
dependencies {
|
||||
implementation(gradleApi())
|
||||
implementation("gradle.plugin.net.minecrell:licenser:0.4.1")
|
||||
@ -33,4 +51,6 @@ dependencies {
|
||||
implementation("org.jfrog.buildinfo:build-info-extractor-gradle:4.9.7")
|
||||
implementation("gradle.plugin.org.spongepowered:spongegradle:0.9.0")
|
||||
implementation("net.minecraftforge.gradle:ForgeGradle:3.0.141")
|
||||
implementation("net.fabricmc:fabric-loom:$loomVersion")
|
||||
implementation("net.fabricmc:sponge-mixin:$mixinVersion")
|
||||
}
|
||||
|
@ -1,3 +1,5 @@
|
||||
import org.gradle.api.Project
|
||||
|
||||
object Versions {
|
||||
const val TEXT = "3.0.1"
|
||||
const val TEXT_EXTRAS = "3.0.2"
|
||||
@ -6,3 +8,12 @@ object Versions {
|
||||
const val JUNIT = "5.5.0"
|
||||
const val MOCKITO = "3.0.0"
|
||||
}
|
||||
|
||||
// Properties that need a project reference to resolve:
|
||||
class ProjectVersions(project: Project) {
|
||||
val loom = project.rootProject.property("loom.version")
|
||||
val mixin = project.rootProject.property("mixin.version")
|
||||
}
|
||||
|
||||
val Project.versions
|
||||
get() = ProjectVersions(this)
|
||||
|
@ -2,3 +2,6 @@ group=com.sk89q.worldedit
|
||||
version=7.1.0-SNAPSHOT
|
||||
|
||||
org.gradle.jvmargs=-Xmx1G
|
||||
|
||||
loom.version=0.2.5-20190906.190953-30
|
||||
mixin.version=0.7.11.38
|
||||
|
@ -1,25 +1,6 @@
|
||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||
import net.fabricmc.loom.task.RemapJarTask
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
jcenter()
|
||||
maven {
|
||||
name = "Fabric"
|
||||
url = uri("https://maven.fabricmc.net/")
|
||||
}
|
||||
maven {
|
||||
name = "sponge"
|
||||
url = uri("https://repo.spongepowered.org/maven")
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
"classpath"("net.fabricmc:fabric-loom:0.2.5-SNAPSHOT")
|
||||
"classpath"("org.spongepowered:mixin:0.7.11-SNAPSHOT")
|
||||
}
|
||||
}
|
||||
|
||||
applyPlatformAndCoreConfiguration()
|
||||
applyShadowConfiguration()
|
||||
|
||||
@ -53,6 +34,11 @@ dependencies {
|
||||
"modImplementation"(it)
|
||||
}
|
||||
|
||||
// Hook these up manually, because Fabric doesn't seem to quite do it properly.
|
||||
"compileClasspath"("net.fabricmc:sponge-mixin:${project.versions.mixin}")
|
||||
"annotationProcessor"("net.fabricmc:sponge-mixin:${project.versions.mixin}")
|
||||
"annotationProcessor"("net.fabricmc:fabric-loom:${project.versions.loom}")
|
||||
|
||||
"testCompile"("org.mockito:mockito-core:1.9.0-rc1")
|
||||
}
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren