Kris Wong
01/02/2020, 6:48 PMjava -jar
LeoColman
01/02/2020, 6:49 PMShadow
plugin and let it do the rest xDKris Wong
01/02/2020, 6:49 PMKris Wong
01/02/2020, 6:49 PMLeoColman
01/02/2020, 6:50 PMKris Wong
01/02/2020, 6:50 PMKris Wong
01/02/2020, 6:51 PMBig Chungus
01/02/2020, 6:57 PMBig Chungus
01/02/2020, 6:59 PMgetByName("jar", Jar::class) {
dependsOn("frontendJar", "backendJar")
group = "package"
manifest {
attributes(
mapOf(
"Implementation-Title" to rootProject.name,
"Implementation-Group" to rootProject.group,
"Implementation-Version" to rootProject.version,
"Timestamp" to System.currentTimeMillis(),
"Main-Class" to mainClassName
)
)
}
val dependencies = configurations["backendRuntimeClasspath"].filter { it.name.endsWith(".jar") } +
project.tasks["backendJar"].outputs.files +
project.tasks["frontendJar"].outputs.files
dependencies.forEach {
if (it.isDirectory) from(it) else from(zipTree(it))
}
exclude("META-INF/*.RSA", "META-INF/*.SF", "META-INF/*.DSA")
inputs.files(dependencies)
outputs.file(archiveFile)
}
Kris Wong
01/02/2020, 7:21 PMjava
is kind of ambiguous in the gradle scriptKris Wong
01/02/2020, 7:22 PMKris Wong
01/02/2020, 7:23 PMpublic interface JavaPluginExtension {
/**
* Returns the source compatibility used for compiling Java sources.
*/
JavaVersion getSourceCompatibility();
/**
* Sets the source compatibility used for compiling Java sources.
*
* @param value The value for the source compatibility
*/
void setSourceCompatibility(JavaVersion value);
/**
* Returns the target compatibility used for compiling Java sources.
*/
JavaVersion getTargetCompatibility();
/**
* Sets the target compatibility used for compiling Java sources.
*
* @param value The value for the target compatibility
*/
void setTargetCompatibility(JavaVersion value);
}
Kris Wong
01/02/2020, 7:23 PMBig Chungus
01/02/2020, 7:24 PMBig Chungus
01/02/2020, 7:24 PMBig Chungus
01/02/2020, 7:25 PMBig Chungus
01/02/2020, 7:25 PMKris Wong
01/02/2020, 7:25 PMBig Chungus
01/02/2020, 7:26 PMBig Chungus
01/02/2020, 7:26 PMKris Wong
01/02/2020, 7:26 PMjar
, not java
, but that doesn't work eitherBig Chungus
01/02/2020, 7:27 PMKris Wong
01/02/2020, 7:29 PMBig Chungus
01/02/2020, 7:30 PMKris Wong
01/02/2020, 7:31 PMKris Wong
01/02/2020, 7:31 PMBig Chungus
01/02/2020, 7:32 PMKris Wong
01/02/2020, 7:32 PMBig Chungus
01/02/2020, 7:33 PMKris Wong
01/02/2020, 7:43 PMjimn
01/04/2020, 12:03 PM