aboutsummaryrefslogtreecommitdiff
path: root/build.gradle.kts
diff options
context:
space:
mode:
authornea <nea@nea.moe>2023-05-25 21:03:08 +0200
committernea <nea@nea.moe>2023-05-25 21:03:08 +0200
commitc9ceb228585dcb4ec6b74023dbb3beaa7db5946a (patch)
tree72c92c5056ab577cb3ebe2bb125291d15b327c73 /build.gradle.kts
parent98b8879ba22af4240bfe5f9b39d7d374b2b71d7d (diff)
downloadFirmament-c9ceb228585dcb4ec6b74023dbb3beaa7db5946a.tar.gz
Firmament-c9ceb228585dcb4ec6b74023dbb3beaa7db5946a.tar.bz2
Firmament-c9ceb228585dcb4ec6b74023dbb3beaa7db5946a.zip
Add licensing info and new contribution policy
Diffstat (limited to 'build.gradle.kts')
-rw-r--r--build.gradle.kts21
1 files changed, 16 insertions, 5 deletions
diff --git a/build.gradle.kts b/build.gradle.kts
index eea6160..ffe94fd 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,3 +1,5 @@
+import moe.nea.licenseextractificator.LicenseDiscoveryTask
+import org.apache.commons.lang3.time.CalendarUtils
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
@@ -7,9 +9,8 @@ plugins {
kotlin("plugin.serialization") version "1.8.10"
id("dev.architectury.loom") version "1.1.336"
id("com.github.johnrengelman.shadow") version "7.1.2"
- id("moe.nea.licenseextractificator") version "fffc76c"
+ id("moe.nea.licenseextractificator")
id("io.github.juuxel.loom-quiltflower") version "1.7.3"
- id("io.gitlab.arturbosch.detekt") version "1.22.0"
}
loom {
@@ -140,12 +141,22 @@ tasks.processResources {
filesMatching("**/lang/*.json") {
// flattenJson(this)
}
- from(tasks.license)
+ from(tasks.scanLicenses)
}
-
-tasks.license {
+tasks.scanLicenses {
scanConfiguration(project.configurations.compileClasspath.get())
outputFile.set(file("$buildDir/LICENSES-FIRMAMENT.json"))
licenseFormatter.set(moe.nea.licenseextractificator.JsonLicenseFormatter())
}
+tasks.create("printAllLicenses", LicenseDiscoveryTask::class.java, licensing).apply {
+ outputFile.set(file("$buildDir/LICENSES-FIRMAMENT.txt"))
+ licenseFormatter.set(moe.nea.licenseextractificator.TextLicenseFormatter())
+ scanConfiguration(project.configurations.compileClasspath.get())
+ doLast {
+ println(outputFile.get().asFile.readText())
+ }
+ outputs.upToDateWhen { false }
+}
+
+licensing.addExtraLicenseMatchers()