65 lines
1.4 KiB
Kotlin
65 lines
1.4 KiB
Kotlin
plugins {
|
|
kotlin("jvm") version "2.3.21"
|
|
id("com.gradleup.shadow") version "9.4.1"
|
|
`maven-publish`
|
|
}
|
|
|
|
group = "dev.zerozipp"
|
|
val agent = "$group.loader.Agent"
|
|
val main = "$group.injector.Main"
|
|
kotlin.jvmToolchain(25)
|
|
version = "0.2"
|
|
|
|
val config = mapOf(
|
|
"Permissions" to "all-permissions",
|
|
"Can-Retransform-Classes" to true,
|
|
"Can-Redefine-Classes" to true,
|
|
"Premain-Class" to agent,
|
|
"Agent-Class" to agent,
|
|
"Main-Class" to main
|
|
)
|
|
|
|
tasks.jar {
|
|
manifest.attributes(config)
|
|
description = "Minimal jar"
|
|
group = "agent"
|
|
}
|
|
|
|
tasks.shadowJar {
|
|
manifest.attributes(config)
|
|
description = "Complete jar"
|
|
archiveClassifier = "all"
|
|
group = "agent"
|
|
}
|
|
|
|
publishing.publications {
|
|
create<MavenPublication>("maven") {
|
|
groupId = project.group.toString()
|
|
version = project.version.toString()
|
|
artifactId = project.name.lowercase()
|
|
artifact(tasks.jar)
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
val buddy = properties["bytebuddy.version"]
|
|
implementation("net.bytebuddy:byte-buddy:$buddy")
|
|
testImplementation(kotlin("test"))
|
|
}
|
|
|
|
publishing.repositories {
|
|
val user = System.getenv("GITEA_USER")
|
|
val pass = System.getenv("GITEA_PASS")
|
|
val api = "https://git.zerozipp.dev/api"
|
|
maven("$api/packages/zerozipp/maven") {
|
|
credentials {
|
|
username = user
|
|
password = pass
|
|
}
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
mavenLocal()
|
|
} |