mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-23 00:29:51 +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:
@@ -2,8 +2,10 @@ package com.dfsek.terra
|
||||
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.kotlin.dsl.apply
|
||||
import org.gradle.kotlin.dsl.creating
|
||||
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.repositories
|
||||
|
||||
@@ -11,14 +13,18 @@ fun Project.configureDependencies() {
|
||||
apply(plugin = "java")
|
||||
apply(plugin = "java-library")
|
||||
|
||||
configurations {
|
||||
val shaded = create("shaded")
|
||||
val shadedApi = create("shadedApi")
|
||||
shaded.extendsFrom(shadedApi)
|
||||
getByName("api").extendsFrom(shadedApi)
|
||||
val shadedImplementation = create("shadedImplementation")
|
||||
shaded.extendsFrom(shadedImplementation)
|
||||
getByName("implementation").extendsFrom(shadedImplementation)
|
||||
val api by configurations.getting
|
||||
val implementation by configurations.getting
|
||||
val testImplementation by configurations.getting
|
||||
val compileOnly by configurations.getting
|
||||
|
||||
val shaded by configurations.creating
|
||||
val shadedApi by configurations.creating {
|
||||
shaded.extendsFrom(this)
|
||||
api.extendsFrom(this)
|
||||
}
|
||||
val shadedImplementation by configurations.creating {
|
||||
implementation.extendsFrom(this)
|
||||
}
|
||||
|
||||
repositories {
|
||||
@@ -31,18 +37,18 @@ fun Project.configureDependencies() {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
"testImplementation"("org.junit.jupiter:junit-jupiter-api:5.7.0")
|
||||
"testImplementation"("org.junit.jupiter:junit-jupiter-engine:5.7.0")
|
||||
"compileOnly"("org.jetbrains:annotations:20.1.0")
|
||||
|
||||
"compileOnly"("com.google.guava:guava:30.0-jre")
|
||||
"testImplementation"("com.google.guava:guava:30.0-jre")
|
||||
testImplementation("org.junit.jupiter:junit-jupiter-api:5.7.0")
|
||||
testImplementation("org.junit.jupiter:junit-jupiter-engine:5.7.0")
|
||||
compileOnly("org.jetbrains:annotations:20.1.0")
|
||||
|
||||
compileOnly("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.
|
||||
dependencies {
|
||||
"compileOnly"(project(":common:api"))
|
||||
"testImplementation"(project(":common:api"))
|
||||
compileOnly(project(":common:api"))
|
||||
testImplementation(project(":common:api"))
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user