diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 5dcba2a8..d3783a93 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -1,10 +1,15 @@ +apply(from= "../gradle/loadProps.gradle.kts") + plugins { `java-gradle-plugin` + `kotlin-dsl` groovy } +val nokeeVersion = extra["nokee.version"] + dependencies { - implementation(platform("dev.nokee:nokee-gradle-plugins:0.4.0-60cff2b")) + implementation(platform("dev.nokee:nokee-gradle-plugins:$nokeeVersion")) } repositories { @@ -26,3 +31,7 @@ gradlePlugin { } } } + +configure { + experimentalWarning.set(false) +} diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 2f77981b..6f8ce0bf 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -31,7 +31,7 @@ tasks.test { workingDir.mkdirs() } -tasks.jar { +fun Jar.includeLicenses() { CrLfSpec(LineEndings.LF).run { into("META-INF") { filteringCharset = "UTF-8" @@ -43,6 +43,10 @@ tasks.jar { } } +tasks.jar { + includeLicenses() +} + val makeDocumentation by tasks.registering(JavaExec::class) { group = "Development" description = "Builds the documentation" diff --git a/gradle.properties b/gradle.properties index a3465744..bd08a928 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,9 +9,9 @@ systemProp.org.gradle.internal.publish.checksums.insecure = true darklaf.version = 2.3.1 # Plugins -shadow.version = 5.1.0 com.github.vlsi.vlsi-release-plugins.version = 1.70 com.github.autostyle.version = 3.1 +nokee.version = 0.4.0-60cff2b # Dependencies jna.version = 5.5.0 diff --git a/gradle/loadProps.gradle.kts b/gradle/loadProps.gradle.kts new file mode 100644 index 00000000..d4b4c7f2 --- /dev/null +++ b/gradle/loadProps.gradle.kts @@ -0,0 +1,10 @@ +import java.io.FileInputStream +import java.util.Properties + +val properties = Properties() +FileInputStream(File("${rootProject.rootDir}/../gradle.properties")).use { + properties.load(it) +} +properties.stringPropertyNames().forEach { + extra[it] = properties[it] +}