mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-17 06:11:24 +00:00
Use latest fancy gradle features to not do that dumb string bullshit from before
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
This commit is contained in:
@@ -9,6 +9,6 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
"implementation"("gradle.plugin.com.github.jengelman.gradle.plugins:shadow:+")
|
implementation("gradle.plugin.com.github.jengelman.gradle.plugins:shadow:+")
|
||||||
"implementation"("org.yaml:snakeyaml:1.27")
|
implementation("org.yaml:snakeyaml:1.27")
|
||||||
}
|
}
|
||||||
@@ -2,8 +2,10 @@ package com.dfsek.terra
|
|||||||
|
|
||||||
import org.gradle.api.Project
|
import org.gradle.api.Project
|
||||||
import org.gradle.kotlin.dsl.apply
|
import org.gradle.kotlin.dsl.apply
|
||||||
|
import org.gradle.kotlin.dsl.creating
|
||||||
import org.gradle.kotlin.dsl.dependencies
|
import org.gradle.kotlin.dsl.dependencies
|
||||||
import org.gradle.kotlin.dsl.invoke
|
import org.gradle.kotlin.dsl.getValue
|
||||||
|
import org.gradle.kotlin.dsl.getting
|
||||||
import org.gradle.kotlin.dsl.project
|
import org.gradle.kotlin.dsl.project
|
||||||
import org.gradle.kotlin.dsl.repositories
|
import org.gradle.kotlin.dsl.repositories
|
||||||
|
|
||||||
@@ -11,14 +13,18 @@ fun Project.configureDependencies() {
|
|||||||
apply(plugin = "java")
|
apply(plugin = "java")
|
||||||
apply(plugin = "java-library")
|
apply(plugin = "java-library")
|
||||||
|
|
||||||
configurations {
|
val api by configurations.getting
|
||||||
val shaded = create("shaded")
|
val implementation by configurations.getting
|
||||||
val shadedApi = create("shadedApi")
|
val testImplementation by configurations.getting
|
||||||
shaded.extendsFrom(shadedApi)
|
val compileOnly by configurations.getting
|
||||||
getByName("api").extendsFrom(shadedApi)
|
|
||||||
val shadedImplementation = create("shadedImplementation")
|
val shaded by configurations.creating
|
||||||
shaded.extendsFrom(shadedImplementation)
|
val shadedApi by configurations.creating {
|
||||||
getByName("implementation").extendsFrom(shadedImplementation)
|
shaded.extendsFrom(this)
|
||||||
|
api.extendsFrom(this)
|
||||||
|
}
|
||||||
|
val shadedImplementation by configurations.creating {
|
||||||
|
implementation.extendsFrom(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
@@ -31,18 +37,18 @@ fun Project.configureDependencies() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
"testImplementation"("org.junit.jupiter:junit-jupiter-api:5.7.0")
|
testImplementation("org.junit.jupiter:junit-jupiter-api:5.7.0")
|
||||||
"testImplementation"("org.junit.jupiter:junit-jupiter-engine:5.7.0")
|
testImplementation("org.junit.jupiter:junit-jupiter-engine:5.7.0")
|
||||||
"compileOnly"("org.jetbrains:annotations:20.1.0")
|
compileOnly("org.jetbrains:annotations:20.1.0")
|
||||||
|
|
||||||
"compileOnly"("com.google.guava:guava:30.0-jre")
|
compileOnly("com.google.guava:guava:30.0-jre")
|
||||||
"testImplementation"("com.google.guava:guava:30.0-jre")
|
testImplementation("com.google.guava:guava:30.0-jre")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (project(":common:addons").subprojects.contains(this)) { // If this is an addon project, depend on the API.
|
if (project(":common:addons").subprojects.contains(this)) { // If this is an addon project, depend on the API.
|
||||||
dependencies {
|
dependencies {
|
||||||
"compileOnly"(project(":common:api"))
|
compileOnly(project(":common:api"))
|
||||||
"testImplementation"(project(":common:api"))
|
testImplementation(project(":common:api"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
dependencies {
|
dependencies {
|
||||||
"shadedApi"(project(":common:addons:manifest-addon-loader"))
|
shadedApi(project(":common:addons:manifest-addon-loader"))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
dependencies {
|
dependencies {
|
||||||
"shadedApi"(project(":common:addons:manifest-addon-loader"))
|
shadedApi(project(":common:addons:manifest-addon-loader"))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
dependencies {
|
dependencies {
|
||||||
"shadedApi"(project(":common:addons:manifest-addon-loader"))
|
shadedApi(project(":common:addons:manifest-addon-loader"))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
dependencies {
|
dependencies {
|
||||||
"shadedApi"(project(":common:addons:manifest-addon-loader"))
|
shadedApi(project(":common:addons:manifest-addon-loader"))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
dependencies {
|
dependencies {
|
||||||
"shadedApi"(project(":common:addons:manifest-addon-loader"))
|
shadedApi(project(":common:addons:manifest-addon-loader"))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
dependencies {
|
dependencies {
|
||||||
"shadedApi"(project(":common:addons:manifest-addon-loader"))
|
shadedApi(project(":common:addons:manifest-addon-loader"))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
dependencies {
|
dependencies {
|
||||||
"shadedApi"(project(":common:addons:manifest-addon-loader"))
|
shadedApi(project(":common:addons:manifest-addon-loader"))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
dependencies {
|
dependencies {
|
||||||
"shadedApi"(project(":common:addons:manifest-addon-loader"))
|
shadedApi(project(":common:addons:manifest-addon-loader"))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
dependencies {
|
dependencies {
|
||||||
"shadedApi"(project(":common:addons:manifest-addon-loader"))
|
shadedApi(project(":common:addons:manifest-addon-loader"))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
dependencies {
|
dependencies {
|
||||||
"shadedApi"(project(":common:addons:manifest-addon-loader"))
|
shadedApi(project(":common:addons:manifest-addon-loader"))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
dependencies {
|
dependencies {
|
||||||
"shadedApi"(project(":common:addons:manifest-addon-loader"))
|
shadedApi(project(":common:addons:manifest-addon-loader"))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
dependencies {
|
dependencies {
|
||||||
"shadedApi"(project(":common:addons:manifest-addon-loader"))
|
shadedApi(project(":common:addons:manifest-addon-loader"))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
dependencies {
|
dependencies {
|
||||||
"shadedApi"(project(":common:addons:manifest-addon-loader"))
|
shadedApi(project(":common:addons:manifest-addon-loader"))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
dependencies {
|
dependencies {
|
||||||
"shadedApi"("com.googlecode.json-simple:json-simple:1.1.1")
|
shadedApi("com.googlecode.json-simple:json-simple:1.1.1")
|
||||||
"shadedApi"(project(":common:addons:manifest-addon-loader"))
|
shadedApi(project(":common:addons:manifest-addon-loader"))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
dependencies {
|
dependencies {
|
||||||
"shadedApi"(project(":common:addons:manifest-addon-loader"))
|
shadedApi(project(":common:addons:manifest-addon-loader"))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
dependencies {
|
dependencies {
|
||||||
"shadedApi"(project(":common:addons:manifest-addon-loader"))
|
shadedApi(project(":common:addons:manifest-addon-loader"))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
dependencies {
|
dependencies {
|
||||||
"shadedImplementation"("com.dfsek.tectonic:yaml:2.1.2")
|
shadedImplementation("com.dfsek.tectonic:yaml:2.1.2")
|
||||||
"shadedApi"(project(":common:addons:manifest-addon-loader"))
|
shadedApi(project(":common:addons:manifest-addon-loader"))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
dependencies {
|
dependencies {
|
||||||
"shadedApi"("commons-io:commons-io:2.6")
|
shadedApi("commons-io:commons-io:2.6")
|
||||||
"shadedImplementation"("com.dfsek.tectonic:yaml:2.1.2")
|
shadedImplementation("com.dfsek.tectonic:yaml:2.1.2")
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType<Jar> {
|
tasks.withType<Jar> {
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
"shadedApi"("commons-io:commons-io:2.6")
|
shadedApi("commons-io:commons-io:2.6")
|
||||||
"shadedApi"("com.github.Querz:NBT:6.1")
|
shadedApi("com.github.Querz:NBT:6.1")
|
||||||
"shadedApi"(project(":common:addons:manifest-addon-loader"))
|
shadedApi(project(":common:addons:manifest-addon-loader"))
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.named<ShadowJar>("shadowJar") {
|
tasks.named<ShadowJar>("shadowJar") {
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
"shadedApi"("commons-io:commons-io:2.6")
|
shadedApi("commons-io:commons-io:2.6")
|
||||||
"shadedApi"(project(":common:addons:manifest-addon-loader"))
|
shadedApi(project(":common:addons:manifest-addon-loader"))
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.named<ShadowJar>("shadowJar") {
|
tasks.named<ShadowJar>("shadowJar") {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
dependencies {
|
dependencies {
|
||||||
"shadedApi"(project(":common:api:util"))
|
shadedApi(project(":common:api:util"))
|
||||||
"shadedApi"("ca.solo-studios:strata:1.0.0")
|
shadedApi("ca.solo-studios:strata:1.0.0")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ afterEvaluate {
|
|||||||
if(it != project) {
|
if(it != project) {
|
||||||
println("Project: ${it.name}")
|
println("Project: ${it.name}")
|
||||||
dependencies {
|
dependencies {
|
||||||
"shadedApi"(it)
|
shadedApi(it)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
dependencies {
|
dependencies {
|
||||||
"shadedApi"(project(":common:api:util"))
|
shadedApi(project(":common:api:util"))
|
||||||
"shadedApi"(project(":common:api:noise"))
|
shadedApi(project(":common:api:noise"))
|
||||||
"shadedApi"(project(":common:api:registry"))
|
shadedApi(project(":common:api:registry"))
|
||||||
"shadedApi"(project(":common:api:addons"))
|
shadedApi(project(":common:api:addons"))
|
||||||
|
|
||||||
"shadedApi"("com.dfsek:Paralithic:0.5.0")
|
shadedApi("com.dfsek:Paralithic:0.5.0")
|
||||||
|
|
||||||
"shadedApi"("com.dfsek.tectonic:common:2.1.2")
|
shadedApi("com.dfsek.tectonic:common:2.1.2")
|
||||||
|
|
||||||
"shadedApi"("net.jafama:jafama:2.3.2")
|
shadedApi("net.jafama:jafama:2.3.2")
|
||||||
|
|
||||||
"shadedApi"("org.slf4j:slf4j-api:1.7.32")
|
shadedApi("org.slf4j:slf4j-api:1.7.32")
|
||||||
|
|
||||||
"shadedApi"("ca.solo-studios:strata:1.0.0")
|
shadedApi("ca.solo-studios:strata:1.0.0")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
dependencies {
|
dependencies {
|
||||||
"shadedApi"(project(":common:api:util"))
|
shadedApi(project(":common:api:util"))
|
||||||
|
|
||||||
"shadedApi"("com.dfsek:Paralithic:0.5.0")
|
shadedApi("com.dfsek:Paralithic:0.5.0")
|
||||||
|
|
||||||
"shadedApi"("com.dfsek.tectonic:common:2.1.2")
|
shadedApi("com.dfsek.tectonic:common:2.1.2")
|
||||||
|
|
||||||
"shadedApi"("net.jafama:jafama:2.3.2")
|
shadedApi("net.jafama:jafama:2.3.2")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
dependencies {
|
dependencies {
|
||||||
"shadedApi"(project(":common:api:util"))
|
shadedApi(project(":common:api:util"))
|
||||||
|
|
||||||
"shadedApi"("com.dfsek:Paralithic:0.5.0")
|
shadedApi("com.dfsek:Paralithic:0.5.0")
|
||||||
|
|
||||||
"shadedApi"("com.dfsek.tectonic:common:2.1.2")
|
shadedApi("com.dfsek.tectonic:common:2.1.2")
|
||||||
|
|
||||||
"shadedApi"("net.jafama:jafama:2.3.2")
|
shadedApi("net.jafama:jafama:2.3.2")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
dependencies {
|
dependencies {
|
||||||
"shadedApi"(project(":common:api:util"))
|
shadedApi(project(":common:api:util"))
|
||||||
|
|
||||||
"shadedApi"("com.dfsek.tectonic:common:2.1.2")
|
shadedApi("com.dfsek.tectonic:common:2.1.2")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
dependencies {
|
dependencies {
|
||||||
"shadedApi"("net.jafama:jafama:2.3.2")
|
shadedApi("net.jafama:jafama:2.3.2")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,18 +15,16 @@ val paperURL = "https://papermc.io/api/v1/paper/%version%/latest/download/"
|
|||||||
val purpurURL = "https://ci.pl3x.net/job/Purpur/lastSuccessfulBuild/artifact/final/purpurclip.jar"
|
val purpurURL = "https://ci.pl3x.net/job/Purpur/lastSuccessfulBuild/artifact/final/purpurclip.jar"
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
"shadedApi"(project(":common:implementation:base"))
|
shadedApi(project(":common:implementation:base"))
|
||||||
|
|
||||||
shadedImplementation("org.slf4j:slf4j-log4j12:1.7.32")
|
shadedImplementation("org.slf4j:slf4j-log4j12:1.7.32")
|
||||||
|
|
||||||
"compileOnly"("io.papermc.paper:paper-api:1.17-R0.1-SNAPSHOT")
|
compileOnly("io.papermc.paper:paper-api:1.17-R0.1-SNAPSHOT")
|
||||||
"shadedImplementation"("io.papermc:paperlib:1.0.5")
|
shadedImplementation("io.papermc:paperlib:1.0.5")
|
||||||
|
|
||||||
"shadedImplementation"("org.bstats:bstats-bukkit:1.7")
|
shadedImplementation("org.bstats:bstats-bukkit:1.7")
|
||||||
|
|
||||||
"compileOnly"("com.sk89q.worldedit:worldedit-bukkit:7.2.0-SNAPSHOT")
|
shadedApi("com.google.guava:guava:30.0-jre")
|
||||||
|
|
||||||
"shadedApi"("com.google.guava:guava:30.0-jre")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val jvmFlags = listOf(
|
val jvmFlags = listOf(
|
||||||
|
|||||||
@@ -22,14 +22,14 @@ val fabricLoader = "0.12.5"
|
|||||||
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
"shadedApi"(project(":common:implementation:base"))
|
shadedApi(project(":common:implementation:base"))
|
||||||
|
|
||||||
shadedImplementation("org.slf4j:slf4j-log4j12:1.7.32")
|
shadedImplementation("org.slf4j:slf4j-log4j12:1.7.32")
|
||||||
// shadedImplementation("org.apache.logging.log4j:log4j-slf4j-impl:2.8.1")
|
// shadedImplementation("org.apache.logging.log4j:log4j-slf4j-impl:2.8.1")
|
||||||
|
|
||||||
"minecraft"("com.mojang:minecraft:$minecraft")
|
minecraft("com.mojang:minecraft:$minecraft")
|
||||||
"mappings"("net.fabricmc:yarn:$minecraft+build.$yarn:v2")
|
mappings("net.fabricmc:yarn:$minecraft+build.$yarn:v2")
|
||||||
"modImplementation"("net.fabricmc:fabric-loader:$fabricLoader")
|
modImplementation("net.fabricmc:fabric-loader:$fabricLoader")
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType<JavaCompile>().configureEach {
|
tasks.withType<JavaCompile>().configureEach {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ val platformOverrides = mapOf(
|
|||||||
)
|
)
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
"shadedApi"(project(":common:implementation"))
|
shadedApi(project(":common:implementation"))
|
||||||
}
|
}
|
||||||
|
|
||||||
val taskSet = HashSet<AbstractArchiveTask>()
|
val taskSet = HashSet<AbstractArchiveTask>()
|
||||||
|
|||||||
@@ -9,14 +9,14 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
"shadedApi"(project(":common:implementation:base"))
|
shadedApi(project(":common:implementation:base"))
|
||||||
|
|
||||||
shadedImplementation("org.slf4j:slf4j-log4j12:1.7.32")
|
shadedImplementation("org.slf4j:slf4j-log4j12:1.7.32")
|
||||||
// "shadedImplementation"("org.apache.logging.log4j:log4j-slf4j-impl:2.8.1")
|
// "shadedImplementation"("org.apache.logging.log4j:log4j-slf4j-impl:2.8.1")
|
||||||
|
|
||||||
"annotationProcessor"("org.spongepowered:spongeapi:9.0.0-SNAPSHOT")
|
annotationProcessor("org.spongepowered:spongeapi:9.0.0-SNAPSHOT")
|
||||||
"shadedImplementation"("org.spongepowered:spongeapi:9.0.0-SNAPSHOT")
|
shadedImplementation("org.spongepowered:spongeapi:9.0.0-SNAPSHOT")
|
||||||
"annotationProcessor"("org.spongepowered:mixin:0.8.2:processor")
|
annotationProcessor("org.spongepowered:mixin:0.8.2:processor")
|
||||||
}
|
}
|
||||||
|
|
||||||
minecraft {
|
minecraft {
|
||||||
|
|||||||
Reference in New Issue
Block a user