DataLockLib/build.gradle.kts

61 lines
1.1 KiB
Plaintext
Raw Normal View History

2022-10-19 16:01:38 +00:00
import java.io.ByteArrayOutputStream
2022-09-26 12:50:30 +00:00
plugins {
id("java")
id("com.github.johnrengelman.shadow") version "7.1.0"
2022-09-27 08:14:12 +00:00
id("maven-publish")
2022-09-26 12:50:30 +00:00
}
2022-10-19 15:30:58 +00:00
allprojects {
group = "com.alttd"
2022-10-19 15:58:53 +00:00
version = "1.0.0-SNAPSHOT"
2022-10-19 15:30:58 +00:00
description = "Altitude DataLock Library."
}
2022-09-26 12:50:30 +00:00
2022-10-19 15:30:58 +00:00
subprojects {
apply<JavaLibraryPlugin>()
apply(plugin = "maven-publish")
2022-09-26 12:50:30 +00:00
2022-10-19 15:30:58 +00:00
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
2022-09-26 12:50:30 +00:00
}
}
tasks {
2022-10-19 15:30:58 +00:00
jar {
enabled = false
2022-09-26 12:50:30 +00:00
}
}
2022-09-27 08:14:12 +00:00
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
}
}
repositories{
maven {
name = "maven"
url = uri("https://repo.destro.xyz/snapshots")
credentials(PasswordCredentials::class)
}
}
}
2022-09-26 12:50:30 +00:00
dependencies {
2022-09-27 08:12:37 +00:00
compileOnly("com.alttd:Galaxy-API:1.19.2-R0.1-SNAPSHOT")
2022-10-19 15:30:58 +00:00
}
2022-10-19 16:01:38 +00:00
fun gitCommit(): String {
val os = ByteArrayOutputStream()
project.exec {
isIgnoreExitValue = true
commandLine = "git rev-parse --short HEAD".split(" ")
standardOutput = os
}
return String(os.toByteArray()).trim()
}