Skip to content
Snippets Groups Projects
Commit 72d97b42 authored by dgelessus's avatar dgelessus
Browse files

Replace convention properties with extension blocks in build.gradle

The Gradle documentation says that these convention properties are
deprecated and superseded by the java and application extension blocks.
Using the convention properties doesn't generate warnings yet, but it
can't hurt to switch to the now recommended way.
parent 61c4905b
No related branches found
No related tags found
No related merge requests found
Pipeline #54858 passed
......@@ -46,8 +46,10 @@ dependencies {
implementation(group: "se.sawano.java", name: "alphanumeric-comparator", version: "1.4.1")
}
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
tasks.withType(JavaCompile) {
options.encoding = SOURCE_ENCODING
......@@ -71,13 +73,17 @@ processResources {
}
}
mainClassName = "de.prob2.jupyter.Main"
application {
mainClass = "de.prob2.jupyter.Main"
}
// Workaround for https://github.com/johnrengelman/shadow/issues/609
mainClassName = application.mainClass.get()
final KERNEL_SPEC_OUTPUT_PATH = project.buildDir.toPath().resolve(Paths.get("kernelspec"))
task createKernelSpec(type: JavaExec) {
dependsOn = [shadowJar]
main = project.mainClassName
mainClass = application.mainClass
args = ["createKernelSpec", KERNEL_SPEC_OUTPUT_PATH.toString()]
classpath(shadowJar.archiveFile)
if (project.hasProperty("probHome")) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment