From fa05d81553ec3bcef1db622457f40f23d5d89678 Mon Sep 17 00:00:00 2001 From: Danylo Kravchenko Date: Tue, 31 Oct 2023 17:10:28 +0100 Subject: [PATCH] initialized new branch for the GIS features; added libraries --- build.gradle | 14 +++++++------- core/build.gradle | 31 +++++++++++++++++++++---------- dbms/build.gradle | 14 +++++++++----- gradle.properties | 6 ++++-- plugins/build.gradle | 4 ++-- webui/build.gradle | 6 +++--- 6 files changed, 46 insertions(+), 29 deletions(-) diff --git a/build.gradle b/build.gradle index efc786ed1a..f63ac241dd 100644 --- a/build.gradle +++ b/build.gradle @@ -48,10 +48,10 @@ allprojects { compileTestJava.options.encoding = "UTF-8" javadoc.options.encoding = "UTF-8" - sourceCompatibility = 1.11 - targetCompatibility = 1.11 + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 - tasks.withType(JavaCompile) { + tasks.withType(JavaCompile).configureEach { options.encoding = "UTF-8" } @@ -71,16 +71,16 @@ allprojects { } } - tasks.withType(JavaCompile) { + tasks.withType(JavaCompile).configureEach { options.encoding = "UTF-8" } - configurations.all { + configurations.configureEach { // check for updates every build resolutionStrategy.cacheChangingModulesFor 0, "seconds" } - tasks.withType(Javadoc) { + tasks.withType(Javadoc).configureEach { if (JavaVersion.current().isJava9Compatible()) { options.addBooleanOption("html5", true) } @@ -92,7 +92,7 @@ allprojects { String storeName = System.getProperty("store.default") != null ? System.getProperty("store.default") : 'hsqldb' - task integrationTests(type: Test) { + tasks.register('integrationTests', Test) { description = 'Runs integration tests.' group = 'verification' systemProperty 'store.default', storeName diff --git a/core/build.gradle b/core/build.gradle index 0cdb5f05ea..af6886fc48 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -43,23 +43,25 @@ dependencies { api group: "org.apache.commons", name: "commons-dbcp2", version: commons_dbcp2_version // Apache 2.0 api group: "com.google.guava", name: "guava", version: guava_version - api(group: "org.reflections", name: "reflections", version: reflections_version) // BSD 2-clause + api group: "org.reflections", name: "reflections", version: reflections_version // BSD 2-clause api group: "com.google.code.gson", name: "gson", version: gson_version // Apache 2.0 - implementation group: "com.esri.geometry", name: "esri-geometry-api", version: esri_geometry_api_version // Apache 2.0 api group: "com.fasterxml.jackson.core", name: "jackson-core", version: jackson_core_version // Apache 2.0 api group: "com.fasterxml.jackson.core", name: "jackson-databind", version: jackson_databind_version // Apache 2.0 api group: "com.google.code.findbugs", name: "jsr305", version: jsr305_version // Apache 2.0 - implementation(group: "com.jayway.jsonpath", name: "json-path", version: json_path_version) { exclude(module: "json-smart"); exclude(group: "org.slf4j") } // Apache 2.0 + implementation(group: "com.jayway.jsonpath", name: "json-path", version: json_path_version) { + exclude module: "json-smart" + exclude group: "org.slf4j" + } // Apache 2.0 implementation group: "org.codehaus.janino", name: "janino", version: janino_version // BSD implementation group: "org.codehaus.janino", name: "commons-compiler", version: commons_compiler_version // BSD implementation group: "com.j256.simplemagic", name: "simplemagic", version: simplemagic_version // ISC api(group: "org.apache.calcite", name: "calcite-linq4j", version: calcite_linq4j_version) { - exclude(module: "guava") - exclude(module: "avatica-core") + exclude module: "guava" + exclude module: "avatica-core" } // Apache 2.0 api(group: "org.polypheny.avatica", name: "avatica-core", version: avatica_core_version) { - exclude(module: "protobuf-java") + exclude module: "protobuf-java" exclude group: "org.apache.calcite", module: "avatica-core" } // Apache 2.0 @@ -75,6 +77,12 @@ dependencies { implementation group: "com.github.docker-java", name: "docker-java", version: java_docker_version // Apache 2.0 implementation group: "com.github.docker-java", name: "docker-java-transport-httpclient5", version: java_docker_version // TODO: should probably be independent version in future + // GIS + // TODO: remove esri library + implementation group: "com.esri.geometry", name: "esri-geometry-api", version: esri_geometry_api_version // Apache 2.0 + implementation group: "org.locationtech.jts", name: "jts-core", version: jts_version // Eclipse Public License 2.0 && Eclipse Distribution License 1.0 (BSD-3 Clause) + implementation group: "org.locationtech.proj4j", name: "proj4j", version: proj4j_version // Apache 2.0 + // uses config internally... /*implementation(group: "com.datastax.oss", name: "java-driver-core", version: cassandra_driver_core_version) { // Apache 2.0 exclude group: "com.github.spotbugs" @@ -121,7 +129,7 @@ sourceSets { } -task generateJdbcVersionProperties(type: Copy) { +tasks.register('generateJdbcVersionProperties', Copy) { from "src/main/resources/version" into project.buildDir.absolutePath + "/classes" expand(version: project.version, versionMajor: versionMajor, versionMinor: versionMinor, buildTimestamp: new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")) @@ -184,15 +192,18 @@ jar { attributes "Version": "$project.version" } } -task sourcesJar(type: Jar, dependsOn: classes) { +tasks.register('sourcesJar', Jar) { + dependsOn classes classifier "sources" from sourceSets.main.allSource } -task javadocJar(type: Jar, dependsOn: javadoc) { +tasks.register('javadocJar', Jar) { + dependsOn javadoc classifier "javadoc" from javadoc.destinationDir } -task testJar(type: Jar, dependsOn: testClasses) { +tasks.register('testJar', Jar) { + dependsOn testClasses classifier "tests" from sourceSets.test.output } diff --git a/dbms/build.gradle b/dbms/build.gradle index 3d88f9696e..fc22f6e62d 100644 --- a/dbms/build.gradle +++ b/dbms/build.gradle @@ -189,11 +189,13 @@ jar { }) } } -task sourcesJar(type: Jar, dependsOn: classes) { +tasks.register('sourcesJar', Jar) { + dependsOn classes classifier "sources" from sourceSets.main.allSource } -task javadocJar(type: Jar, dependsOn: javadoc) { +tasks.register('javadocJar', Jar) { + dependsOn javadoc classifier "javadoc" from javadoc.destinationDir } @@ -206,10 +208,11 @@ shadowJar { } } -task deletePlugins(type: Delete) { +tasks.register('deletePlugins', Delete) { delete 'src/main/resources/plugins' } -task copyPlugins(type: Copy, dependsOn: deletePlugins) { +tasks.register('copyPlugins', Copy) { + dependsOn deletePlugins from('../build/plugins') into('src/main/resources/plugins') include('*.zip') @@ -226,7 +229,8 @@ configurations { } -task testJar(type: Jar, dependsOn: testClasses) { +tasks.register('testJar', Jar) { + dependsOn testClasses classifier 'tests' from sourceSets.test.output } diff --git a/gradle.properties b/gradle.properties index b5d266c402..f743ffe8f6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -82,6 +82,7 @@ jetty_websocket_api_version = 9.4.48.v20220622 json_path_version = 2.4.0 jsoup_version = 1.11.3 jsr305_version = 3.0.1 +jts_version = 1.19.0 junit_jupiter_version = 5.7.0 junit_version = 4.13.1 lang_painless_version = 6.2.4 @@ -93,7 +94,7 @@ log4j_slf4j_impl_version = 2.19.0 lombok_version = 8.0.1 mapdb_version = 3.0.9 mariadb_version = 2.7.2 -metadata_extractor_version = 2.15.0 +metadata_extractor_version = 2.18.0 mockito_core_version = 2.22.0 monetdb_version = 2.37 mongodb_driver_sync_version = 4.10.2 @@ -110,9 +111,10 @@ polypheny_jdbc_driver_version = 1.5.3 polypheny_ui_version = 1.0-SNAPSHOT postgresql_version = 42.2.19 pf4j_version = 3.9.0 -quidem_version = 0.9 +proj4j_version = 1.3.0 protobuf_version = 3.23.4 protobuf_plugin_version = 0.9.4 +quidem_version = 0.9 reflections_version = 0.10.2 shadow_plugin_version = 7.1.1 simplemagic_version = 1.16 diff --git a/plugins/build.gradle b/plugins/build.gradle index 56d1fee467..5169e6822d 100644 --- a/plugins/build.gradle +++ b/plugins/build.gradle @@ -37,7 +37,7 @@ subprojects { } } - task plugin(type: Jar) { + tasks.register('plugin', Jar) { manifest { attributes 'Plugin-Class': "${pluginClass}", 'Plugin-Id': "${pluginId}", @@ -60,7 +60,7 @@ subprojects { extension('zip') } - task assemblePlugin(type: Copy) { + tasks.register('assemblePlugin', Copy) { from plugin into pluginsDir } diff --git a/webui/build.gradle b/webui/build.gradle index be96fa9de0..6b8a86def0 100644 --- a/webui/build.gradle +++ b/webui/build.gradle @@ -1,7 +1,7 @@ group "org.polypheny" -configurations.all { +configurations.configureEach { // check for updates every build resolutionStrategy.cacheChangingModulesFor 0, "seconds" } @@ -65,7 +65,7 @@ processResources { // unzip ui files -task unzipUiFiles(type: Copy) { +tasks.register('unzipUiFiles', Copy) { from zipTree(configurations.uiFiles.singleFile) into "$buildDir/webapp" doLast { @@ -93,7 +93,7 @@ jar { attributes "Version": "$project.version" } from("$buildDir/webapp") // include webapp files - duplicatesStrategy = 'include' + duplicatesStrategy = DuplicatesStrategy.INCLUDE } java { //withJavadocJar()