Add license to client only entries for client modules. (#2683)

(cherry picked from commit eed73ed20d)
This commit is contained in:
modmuss50 2022-11-22 16:49:14 +00:00
parent 9d081d647b
commit d12c5477ae

View file

@ -9,7 +9,7 @@ plugins {
id "eclipse"
id "idea"
id "maven-publish"
id "fabric-loom" version "1.0.7" apply false
id "fabric-loom" version "1.0.12" apply false
id "com.diffplug.spotless" version "6.11.0"
id "org.ajoberstar.grgit" version "3.1.0"
id "com.matthewprenger.cursegradle" version "1.4.0"
@ -248,12 +248,22 @@ allprojects {
archiveClassifier = "testmod"
}
[jar, testmodJar, sourcesJar].each {
[jar, sourcesJar].each {
it.from(rootProject.file("LICENSE")) {
rename { "${it}-${project.archivesBaseName}"}
}
}
if (file("src/client").exists() && !file("src/main").exists()) {
remapJar {
additionalClientOnlyEntries.add("LICENSE-${project.archivesBaseName}")
}
remapSourcesJar {
additionalClientOnlyEntries.add("LICENSE-${project.archivesBaseName}")
}
}
task remapTestmodJar(type: net.fabricmc.loom.task.RemapJarTask, dependsOn: testmodJar) {
input = testmodJar.archiveFile
archiveClassifier = "testmod"