mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-04 22:15:37 +00:00
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:
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")}"
|
||||
}
|
||||
Reference in new issue
Block a user