mirror of
https://github.com/tadfisher/gradle2nix.git
synced 2026-01-11 23:40:37 -05:00
Miscellaneous cleanup
This commit is contained in:
@@ -11,10 +11,8 @@ dependencies {
|
||||
implementation(libs.clikt)
|
||||
implementation(libs.gradle.toolingApi)
|
||||
implementation(libs.kotlinx.coroutines.core)
|
||||
implementation(libs.okio)
|
||||
implementation(libs.serialization.json)
|
||||
runtimeOnly(libs.slf4j.simple)
|
||||
implementation(libs.xmlutil)
|
||||
|
||||
"share"(project(":plugin", configuration = "shadow")) {
|
||||
isTransitive = false
|
||||
@@ -29,12 +27,13 @@ dependencies {
|
||||
application {
|
||||
mainClass.set("org.nixos.gradle2nix.MainKt")
|
||||
applicationName = "gradle2nix"
|
||||
applicationDefaultJvmArgs = listOf(
|
||||
"-Dorg.nixos.gradle2nix.share=@APP_HOME@/share",
|
||||
"-Dslf4j.internal.verbosity=ERROR"
|
||||
)
|
||||
applicationDefaultJvmArgs =
|
||||
listOf(
|
||||
"-Dorg.nixos.gradle2nix.share=@APP_HOME@/share",
|
||||
"-Dslf4j.internal.verbosity=ERROR",
|
||||
)
|
||||
applicationDistribution
|
||||
.from(configurations.named("share"), files("../gradle.nix"))
|
||||
.from(configurations.named("share"))
|
||||
.into("share")
|
||||
.rename("plugin.*\\.jar", "plugin.jar")
|
||||
}
|
||||
@@ -51,32 +50,31 @@ val updateGolden = providers.gradleProperty("update-golden")
|
||||
|
||||
tasks {
|
||||
(run) {
|
||||
dependsOn(installDist)
|
||||
doFirst {
|
||||
systemProperties("org.nixos.gradle2nix.share" to installDist.get().destinationDir.resolve("share"))
|
||||
}
|
||||
enabled = false
|
||||
}
|
||||
|
||||
startScripts {
|
||||
doLast {
|
||||
unixScript.writeText(
|
||||
unixScript.readText().replace("@APP_HOME@", "'\$APP_HOME'")
|
||||
unixScript.readText().replace("@APP_HOME@", "'\$APP_HOME'"),
|
||||
)
|
||||
windowsScript.writeText(
|
||||
windowsScript.readText().replace("@APP_HOME@", "%APP_HOME%"))
|
||||
windowsScript.readText().replace("@APP_HOME@", "%APP_HOME%"),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
withType<Test> {
|
||||
notCompatibleWithConfigurationCache("huh?")
|
||||
dependsOn(installDist)
|
||||
// TODO Find out why this fails the configuration cache
|
||||
test {
|
||||
notCompatibleWithConfigurationCache("contains a Task reference")
|
||||
val shareDir = layout.dir(installDist.map { it.destinationDir.resolve("share") })
|
||||
doFirst {
|
||||
if (updateGolden.isPresent) {
|
||||
systemProperty("org.nixos.gradle2nix.update-golden", "")
|
||||
}
|
||||
systemProperties(
|
||||
"org.nixos.gradle2nix.share" to installDist.get().destinationDir.resolve("share"),
|
||||
"org.nixos.gradle2nix.m2" to "http://0.0.0.0:8989/m2"
|
||||
"org.nixos.gradle2nix.share" to shareDir.get().asFile,
|
||||
"org.nixos.gradle2nix.m2" to "http://0.0.0.0:8989/m2",
|
||||
)
|
||||
}
|
||||
useJUnitPlatform()
|
||||
|
||||
Reference in New Issue
Block a user