diff --git a/Jenkinsfile b/Jenkinsfile index 1c8f388b..47d789fb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -2,7 +2,7 @@ pipeline { agent any tools { - gradle 'Gradle-6' + gradle 'Gradle-9' } diff --git a/Procfile b/Procfile index 8f1d0e3b..1e882d73 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: ./build/install/todo/bin/todo +web: java -Dserver.port=$PORT --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED -jar build/libs/*.jar \ No newline at end of file diff --git a/README.md b/README.md index 282bb1e5..7416b103 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Java-Week3-ToDo-List -Author: Brian Marete +Author: Kennedy Mukuna. Official repo for the "To Do List" project using Java, Spark, Handlebars etc for week 3 of java unit. diff --git a/build.gradle b/build.gradle index 9c53499e..3a2d4e0c 100644 --- a/build.gradle +++ b/build.gradle @@ -6,10 +6,28 @@ plugins { group 'to-do.list' version '1.0-SNAPSHOT' -applicationName = "todo" -mainClassName = 'App' +application { + mainClass = 'App' +} + +jar { + manifest { + attributes 'Main-Class': 'App' + } + from { + configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } + } + duplicatesStrategy = DuplicatesStrategy.EXCLUDE +} -sourceCompatibility = 1.8 +java { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 +} + +test { + useJUnitPlatform() +} repositories { mavenCentral() @@ -18,6 +36,7 @@ repositories { dependencies { testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0' testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0' + testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.7.0' implementation "com.sparkjava:spark-core:2.6.0" implementation "com.sparkjava:spark-template-handlebars:2.5.5" implementation 'org.slf4j:slf4j-simple:1.7.21' @@ -25,5 +44,4 @@ dependencies { implementation group: 'com.h2database', name: 'h2', version: '1.4.191' } - -task stage(dependsOn: ['clean', 'installDist']) +task stage(dependsOn: ['clean', 'installDist']) \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index bb8b2fc2..d30212c0 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists