Skip to content

L2p Service Migration v1.1.1 to v1.2.0 (Java 17)

Philipp Dolif edited this page Oct 5, 2021 · 9 revisions

WIP: This wiki page will be used to document the required changes to update a las2peer service from v1.1.1 to the (not yet released) first version of las2peer that supports Java 17 (v1.2.0).

Update Gradle to version 7.2

Most of the services that followed the Gradle migration guide when las2peer v1.1.1 was released should be using Gradle 6.8. To work with Java 17, Gradle needs to be updated to version 7.2.

  1. Before updating, you should run

    ./gradlew build --warning-mode=all
    

    to see the deprecation warnings in the console. These warnings contain useful information helping to update your buildscript to be working with Gradle 7.2. Here are the changes that were necessary in the template-project:

    • In the repositories, replace "jcenter()" with "mavenCentral()".
    • In the dependencies, replace "compileOnly" with "implementation".
    • In the configurations, replace "testCompile.extendsFrom compileOnly" with "testImplementation.extendsFrom implementation".
    • In the jar configuration, replace
      mainClassName = "i5.las2peer.tools.L2pNodeLauncher"
      
      with
      mainClass.set("i5.las2peer.tools.L2pNodeLauncher")
      
    • Replace
      tasks.withType(Jar) {
          destinationDir = file("$projectDir/export/jars")
      }
      
      with
      tasks.withType(Jar) {
          destinationDirectory = file("$projectDir/export/jars")
      }
      
    • When using Jacoco, update the toolVersion to 0.8.7.
  2. Update Gradle plugins (if any plugins are used).

  3. Update the Gradle wrapper by running

    gradle wrapper --gradle-version 7.2
    

Use Java 17

  • Update the GitHub workflow files (if there are any) to use Java 17.
  • Set "java.version" to 17 in gradle.properties file.

Update startscript generation

TODO

Clone this wiki locally