Update SpongeGradle to 1.1.1-SNAPSHOT and Indra to 2.0.5

Also move common configuration to convention plugins
This commit is contained in:
jmp committed 2021-05-28 01:51:52 -07:00
1 parent 6518cecce2
commit eb7ec4353f
14 files changed
+117 -108

No files matched your search

@@ -0,0 +1,22 @@
plugins {
id("carbon.base-conventions")
}
val platformExtension = extensions.create<CarbonPlatformExtension>("carbonPlatformExtension", project)
tasks {
val copyJar = register<FileCopyTask>("copyJar") {
fileToCopy.set(platformExtension.jarTask.flatMap { it.archiveFile })
destinationDirectory.set(rootProject.layout.buildDirectory.dir("libs"))
dependsOn(platformExtension.jarTask)
}
build {
dependsOn(copyJar)
}
}
val projectVersion = version as String
if (projectVersion.endsWith("-SNAPSHOT")) {
// Add git commit hash to version for platforms
version = "$projectVersion+${indraGit.commit()?.name?.substring(0, 7) ?: error("Failed to retrieve git commit hash")}"
}