From ae6329836a9542c6686cc6f5844474df293fb925 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kub=C3=A1nyi?= Date: Mon, 23 Sep 2024 07:02:22 +0200 Subject: [PATCH 1/6] chore: update gradle (#176) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Daniel Kubányi --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 48c0a02c..e1adfb49 100755 --- 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-8.7-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From 7c779b7a026e1670a00fb6de84973058b29836b7 Mon Sep 17 00:00:00 2001 From: Stefan Ziegler Date: Fri, 22 Nov 2024 09:02:57 +0100 Subject: [PATCH 2/6] use upload-artifact@v3 --- .github/workflows/gretl.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gretl.yml b/.github/workflows/gretl.yml index 72a943bb..76942634 100644 --- a/.github/workflows/gretl.yml +++ b/.github/workflows/gretl.yml @@ -53,7 +53,7 @@ jobs: S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }} S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY }} - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 if: ${{ failure() }} with: name: reports-jar @@ -121,7 +121,7 @@ jobs: S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }} S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY }} - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 if: ${{ failure() }} with: name: reports-docker From 5f0452e087b5fccae59e53e1134b7a86114166e9 Mon Sep 17 00:00:00 2001 From: Stefan Ziegler Date: Fri, 22 Nov 2024 10:19:11 +0100 Subject: [PATCH 3/6] bump version number --- .github/workflows/gretl.yml | 8 ++++---- runtimeImage/build.gradle | 2 +- versioning.gradle | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/gretl.yml b/.github/workflows/gretl.yml index 76942634..e8e805d3 100644 --- a/.github/workflows/gretl.yml +++ b/.github/workflows/gretl.yml @@ -83,12 +83,12 @@ jobs: images: sogis/gretl labels: | org.opencontainers.image.title=gretl - org.opencontainers.image.version=2.2.${{ github.run_number }} + org.opencontainers.image.version=3.0.${{ github.run_number }} org.opencontainers.image.base.name=docker.io/eclipse-temurin:11-jdk-alpine tags: | - type=raw,value=2.3.${{ github.run_number }},enable=true,priority=200 - type=raw,value=2.3,enable=true,priority=200 - type=raw,value=2,enable=true,priority=200 + type=raw,value=3.0.${{ github.run_number }},enable=true,priority=200 + type=raw,value=3.0,enable=true,priority=200 + type=raw,value=3,enable=true,priority=200 type=raw,value=latest,enable=true,priority=200 - name: Login to GitHub Container Registry diff --git a/runtimeImage/build.gradle b/runtimeImage/build.gradle index 2f9722a0..2b50d637 100755 --- a/runtimeImage/build.gradle +++ b/runtimeImage/build.gradle @@ -10,7 +10,7 @@ configurations.all { } dependencies { - api 'ch.so.agi:gretl:2.3.+' + api 'ch.so.agi:gretl:3.0.+' // Add 3rd party libs which we want in the docker image. api libs.gradle.download.task diff --git a/versioning.gradle b/versioning.gradle index 0e81dd6e..31a9fa19 100644 --- a/versioning.gradle +++ b/versioning.gradle @@ -9,7 +9,7 @@ if (System.env.BUILD_NUMBER) { buildNumber = System.env.GITHUB_RUN_NUMBER } -version = new ProjectVersion(2, 3, buildNumber) +version = new ProjectVersion(3, 0, buildNumber) class ProjectVersion { Integer major From acc29aaa86e5c3773a0261156758a950d13f8c73 Mon Sep 17 00:00:00 2001 From: Stefan Ziegler Date: Fri, 22 Nov 2024 12:56:30 +0100 Subject: [PATCH 4/6] rename some dependencies in libs.versions.toml --- gradle/libs.versions.toml | 17 ++++++++--------- gretl/build.gradle | 16 ++++++++-------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index a6465d61..3e5340fd 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -44,18 +44,17 @@ awssdk = "1.12.761" [libraries] iox-ili = { group = "ch.interlis", name = "iox-ili", version.ref = "ioxIliVersion" } -ili-validator = { group = "ch.interlis", name = "ilivalidator", version.ref = "ilivalidatorVersion" } -ili-custom-validator-functions = { group = "io.github.sogis", name = "ilivalidator-custom-functions", version.ref = "ilivalidatorCustomFunctionsVersion" } -ili-custom-validator-geometries = { group = "io.github.sogis", name = "ilivalidator-custom-functions-geometries", version.ref = "ilivalidatorCustomFunctionsGeometriesVersion" } -ili-validator-custom-geometries = { group = "io.github.sogis", name = "ilivalidator-custom-functions-geometries", version.ref = "ilivalidatorCustomFunctionsGeometriesVersion" } +ilivalidator = { group = "ch.interlis", name = "ilivalidator", version.ref = "ilivalidatorVersion" } +ilivalidator-custom-functions = { group = "io.github.sogis", name = "ilivalidator-custom-functions", version.ref = "ilivalidatorCustomFunctionsVersion" } +ilivalidator-custom-functions-geometries = { group = "io.github.sogis", name = "ilivalidator-custom-functions-geometries", version.ref = "ilivalidatorCustomFunctionsGeometriesVersion" } geow-custom-functions = { group = "ch.geowerkstatt.ilivalidator.extensions.functions", name = "geow-interlis-functions", version.ref = "geowCustomFunctionsVersion" } -ili2-pg = { group = "ch.interlis", name = "ili2pg", version.ref = "ili2pgVersion" } -ili2-gpkg = { group = "ch.interlis", name = "ili2gpkg", version.ref = "ili2gpkgVersion" } +ili2pg = { group = "ch.interlis", name = "ili2pg", version.ref = "ili2pgVersion" } +ili2gpkg = { group = "ch.interlis", name = "ili2gpkg", version.ref = "ili2gpkgVersion" } iox-wkf = { group = "ch.interlis", name = "iox-wkf", version.ref = "ioxWkfVersion" } -ehi-sql-gen = { group = "ch.ehi", name = "ehisqlgen", version.ref = "ehiSqlgenVersion" } +ehisqlgen = { group = "ch.ehi", name = "ehisqlgen", version.ref = "ehiSqlgenVersion" } iox-formats = { group = "io.github.sogis", name = "iox-formats", version.ref = "ioxFormatsVersion" } -av2-ch = { group = "io.github.sogis", name = "av2ch", version.ref = "av2chVersion" } -av2-geobau = { group = "ch.interlis", name = "av2geobau", version.ref = "av2geobauVersion" } +av2ch = { group = "io.github.sogis", name = "av2ch", version.ref = "av2chVersion" } +av2geobau = { group = "ch.interlis", name = "av2geobau", version.ref = "av2geobauVersion" } aws-sdk-s3 = { group = "software.amazon.awssdk", name = "s3", version.ref = "awsSdkVersion" } aws-java-sdk = { group = "com.amazonaws", name = "aws-java-sdk", version.ref = "awssdk" } apache-commons-io = { group = "commons-io", name = "commons-io", version.ref = "apacheCommonsIoVersion" } diff --git a/gretl/build.gradle b/gretl/build.gradle index a7f2e8c9..03218b57 100755 --- a/gretl/build.gradle +++ b/gretl/build.gradle @@ -69,14 +69,14 @@ dependencies { api gradleApi() - api libs.ili.validator - api libs.ili.custom.validator.functions - api libs.ili.custom.validator.geometries + api libs.ilivalidator + api libs.ilivalidator.custom.functions + api libs.ilivalidator.custom.functions.geometries api libs.geow.custom.functions - api (libs.ili2.pg) { + api (libs.ili2pg) { exclude group: 'ch.ehi', module: 'ehisqlgen' } - api (libs.ili2.gpkg) { + api (libs.ili2gpkg) { exclude group: 'ch.ehi', module: 'ehisqlgen' } api (libs.iox.wkf) { @@ -87,15 +87,15 @@ dependencies { } api libs.iox.ili - api libs.ehi.sql.gen + api libs.ehisqlgen api (libs.iox.formats) { exclude group: 'org.slf4j', module: 'slf4j-reload4j' exclude group: 'hsqldb', module: 'hsqldb' } - api libs.av2.ch - api libs.av2.geobau + api libs.av2ch + api libs.av2geobau api libs.aws.sdk.s3 From ccefd94f94817955f5eed15292841000dbe66fa2 Mon Sep 17 00:00:00 2001 From: Stefan Ziegler Date: Mon, 25 Nov 2024 15:15:18 +0100 Subject: [PATCH 5/6] fix eclipse project (_is accessible from more than one module_) --- README.md | 10 ++++++++++ gretl/build.gradle | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6cb88b5a..bf9e8926 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,16 @@ The _GRETL_ repository is organized as Gradle multi-project: * `gretl`: _GRETL_ source code with unit tests _and_ integration tests. * `runtimeImage`: Subproject for building the _GRETL_ runtime (docker) image. The docker image is tested against the integration tests, too. +## Developing + +### Eclipse + +Since `java.xml` is part of the JDK but is also a dependency of the Gradle API (which is automatically added by the `java-gradle-plugin`) you will get the famous `The package javax.xml.transform.stream is accessible from more than one module: ,java.xml` errors. Excluding `xml-apis` with `all*.exclude group: 'xml-apis'` should be done but will not work for the Gradle API. Workaround: + +- Clone the repository +- Run `./gradlew eclipse` +- Add `org.eclipse.jdt.core.compiler.ignoreUnnamedModuleForSplitPackage=enabled` to _gretl/.settings/org.eclipse.jdt.core.prefs_. + ## Oracle JDBC There are still signs and wonders taking place: Since fall 2019 the Oracle JDBC library can be found on maven central. Oracle database support is now straight forward. diff --git a/gretl/build.gradle b/gretl/build.gradle index 03218b57..844dd51a 100755 --- a/gretl/build.gradle +++ b/gretl/build.gradle @@ -61,7 +61,9 @@ configurations { all*.exclude module: 'spring-boot-starter-logging' all*.exclude group: 'org.slf4j', module: 'slf4j-simple' - all*.exclude group: 'ch.qos.logback', module: 'logback-classic' + all*.exclude group: 'ch.qos.logback', module: 'logback-classic' + + all*.exclude group: 'xml-apis' } dependencies { From a594b73306af64ea3dc6c33833100b81fb709005 Mon Sep 17 00:00:00 2001 From: Stefan Ziegler Date: Mon, 25 Nov 2024 16:12:31 +0100 Subject: [PATCH 6/6] add source and target compatibility --- gretl/build.gradle | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gretl/build.gradle b/gretl/build.gradle index 844dd51a..f351046b 100755 --- a/gretl/build.gradle +++ b/gretl/build.gradle @@ -12,6 +12,8 @@ java { languageVersion = JavaLanguageVersion.of(11) vendor = JvmVendorSpec.ADOPTIUM } + sourceCompatibility = "11" + targetCompatibility = "11" } compileJava.options.encoding = 'US-ASCII'