You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2023/11/28 17:14:30 UTC

(sis) branch geoapi-4.0 updated (af3440719f -> 516dfb985f)

This is an automated email from the ASF dual-hosted git repository.

desruisseaux pushed a change to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git


    from af3440719f Create a "sis.library-conventions" with some common configuration for Gradle build.
     new ad045a37bf Revert the deletion of `AbstractGridCoverageResource.getEnvelope()`, but with redirection to the default method defined in the interface.
     new 516dfb985f Build configuration: remove `sis.library-conventions.gradle.kts` because it depends on `kotlin-dsl`, which is not compatible with Java 21. Even if Apache SIS targets Java 11, we want it to compile with newer Java versions.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 buildSrc/build.gradle.kts                          |  1 -
 .../main/kotlin/sis.library-conventions.gradle.kts | 68 ----------------------
 endorsed/build.gradle.kts                          | 15 ++++-
 .../sis/storage/AbstractGridCoverageResource.java  | 15 +++++
 gradle.properties                                  | 13 +++++
 incubator/build.gradle.kts                         | 16 ++++-
 optional/build.gradle.kts                          | 15 ++++-
 7 files changed, 70 insertions(+), 73 deletions(-)
 delete mode 100644 buildSrc/src/main/kotlin/sis.library-conventions.gradle.kts
 create mode 100644 gradle.properties


(sis) 01/02: Revert the deletion of `AbstractGridCoverageResource.getEnvelope()`, but with redirection to the default method defined in the interface.

Posted by de...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git

commit ad045a37bf209ae04d7ece029e7dee1ec41c4e22
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Tue Nov 28 16:16:02 2023 +0100

    Revert the deletion of `AbstractGridCoverageResource.getEnvelope()`,
    but with redirection to the default method defined in the interface.
---
 .../apache/sis/storage/AbstractGridCoverageResource.java  | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/AbstractGridCoverageResource.java b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/AbstractGridCoverageResource.java
index 862133bc4f..dcb29b2e3f 100644
--- a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/AbstractGridCoverageResource.java
+++ b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/AbstractGridCoverageResource.java
@@ -17,6 +17,7 @@
 package org.apache.sis.storage;
 
 import java.util.Locale;
+import java.util.Optional;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 import java.util.logging.LogRecord;
@@ -96,6 +97,20 @@ public abstract class AbstractGridCoverageResource extends AbstractResource impl
         super(parentListeners, hidden);
     }
 
+    /**
+     * Returns the envelope of the grid geometry if known.
+     * The envelope is absent if the grid geometry does not provide this information.
+     *
+     * @return the grid geometry envelope.
+     * @throws DataStoreException if an error occurred while computing the grid geometry.
+     *
+     * @see GridGeometry#getEnvelope()
+     */
+    @Override
+    public Optional<Envelope> getEnvelope() throws DataStoreException {
+        return GridCoverageResource.super.getEnvelope();
+    }
+
     /**
      * Invoked in a synchronized block the first time that {@code getMetadata()} is invoked.
      * The default implementation populates metadata based on information provided by


(sis) 02/02: Build configuration: remove `sis.library-conventions.gradle.kts` because it depends on `kotlin-dsl`, which is not compatible with Java 21. Even if Apache SIS targets Java 11, we want it to compile with newer Java versions.

Posted by de...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git

commit 516dfb985ff2b6f638f3a25c2159ef3afcbf3377
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Tue Nov 28 17:51:06 2023 +0100

    Build configuration: remove `sis.library-conventions.gradle.kts`
    because it depends on `kotlin-dsl`, which is not compatible with Java 21.
    Even if Apache SIS targets Java 11, we want it to compile with newer Java versions.
---
 buildSrc/build.gradle.kts                          |  1 -
 .../main/kotlin/sis.library-conventions.gradle.kts | 68 ----------------------
 endorsed/build.gradle.kts                          | 15 ++++-
 gradle.properties                                  | 13 +++++
 incubator/build.gradle.kts                         | 16 ++++-
 optional/build.gradle.kts                          | 15 ++++-
 6 files changed, 55 insertions(+), 73 deletions(-)

diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts
index 8b74d433bc..cfbc70ea94 100644
--- a/buildSrc/build.gradle.kts
+++ b/buildSrc/build.gradle.kts
@@ -16,7 +16,6 @@
  */
 plugins {
     `java-gradle-plugin`
-    `kotlin-dsl`
 }
 
 gradlePlugin {
diff --git a/buildSrc/src/main/kotlin/sis.library-conventions.gradle.kts b/buildSrc/src/main/kotlin/sis.library-conventions.gradle.kts
deleted file mode 100644
index 140c601648..0000000000
--- a/buildSrc/src/main/kotlin/sis.library-conventions.gradle.kts
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-group = "org.apache.sis"
-version = "2.0-SNAPSHOT"
-
-/*
- * "org.apache.sis.buildtools" is a custom Gradle plugin for building a project with Module Source Hierarchy
- * as specified in https://docs.oracle.com/en/java/javase/21/docs/specs/man/javac.html#directory-hierarchies
- * The expected hierarchy is:
- *
- *   endorsed
- *     ├─ build
- *     └─ src
- *         ├─ org.apache.sis.metadata
- *         │    ├─ main
- *         │    │   ├─ module-info.java
- *         │    │   └─ org/apache/sis/metadata/…
- *         │    └─ test
- *         │        └─ org/apache/sis/metadata/…
- *         ├─ org.apache.sis.referencing
- *         │    ├─ main
- *         │    │   ├─ module-info.java
- *         │    │   └─ org/apache/sis/referencing/…
- *         │    └─ test
- *         │        └─ org/apache/sis/referencing/…
- *         └─ etc.
- */
-plugins {
-    `java-library`
-    `maven-publish`
-    signing
-}
-
-/*
- * Configuration of the repositories where to deploy artifacts.
- */
-publishing {
-    repositories {
-        maven {
-            name = "Apache"
-            url = uri(if (version.toString().endsWith("SNAPSHOT"))
-                      "https://repository.apache.org/content/repositories/snapshots" else
-                      "https://repository.apache.org/service/local/staging/deploy/maven2")
-            credentials {
-                val asfNexusUsername = providers.gradleProperty("asfNexusUsername")
-                val asfNexusPassword = providers.gradleProperty("asfNexusPassword")
-                if (asfNexusUsername.isPresent() && asfNexusPassword.isPresent()) {
-                    username = asfNexusUsername.get()
-                    password = asfNexusPassword.get()
-                }
-            }
-        }
-    }
-}
diff --git a/endorsed/build.gradle.kts b/endorsed/build.gradle.kts
index 39ec0363db..614b3c4b21 100644
--- a/endorsed/build.gradle.kts
+++ b/endorsed/build.gradle.kts
@@ -14,6 +14,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+group = "org.apache.sis"
+// The version is specified in `gradle.properties`.
 
 /*
  * This project uses a custom Gradle plugin for building a project with Module Source Hierarchy as specified
@@ -38,7 +40,10 @@
  *         └─ etc.
  */
 plugins {
-    id("sis.library-conventions")
+    `java-library`
+    `maven-publish`
+    signing
+    id("net.linguica.maven-settings") version "0.5"
     id("org.apache.sis.buildtools")
 }
 
@@ -441,6 +446,14 @@ publishing {
             }
         }
     }
+    /* Following block is currently repeated in all sub-projects. */
+    repositories {
+        maven {
+            val stage = if (version.toString().endsWith("SNAPSHOT")) "snapshots" else "releases"
+            name = providers.gradleProperty("${stage}Id").get()
+            url = uri(providers.gradleProperty("${stage}URL").get())
+        }
+    }
 }
 
 signing {
diff --git a/gradle.properties b/gradle.properties
new file mode 100644
index 0000000000..df07faace3
--- /dev/null
+++ b/gradle.properties
@@ -0,0 +1,13 @@
+#
+# Branch-specific or tag-specific properties of Apache SIS.
+# This file provides a single location where version number
+# and deployment URL can be changed before new tags.
+#
+version=2.0-SNAPSHOT
+
+# Following identifiers should match <server> elements in the Maven settings.xml file.
+# They are used for fetching the credentials for publishing binaries in a repository.
+snapshotsId  = apache.snapshots.https
+releasesId   = apache.releases.https
+snapshotsURL = https://repository.apache.org/content/repositories/snapshots
+releasesURL  = https://repository.apache.org/service/local/staging/deploy/maven2
diff --git a/incubator/build.gradle.kts b/incubator/build.gradle.kts
index cf4ec04008..58d4fefc52 100644
--- a/incubator/build.gradle.kts
+++ b/incubator/build.gradle.kts
@@ -14,15 +14,19 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+group = "org.apache.sis"
+// The version is specified in `gradle.properties`.
 
 /*
  * This project uses a custom Gradle plugin for building a project with Module Source Hierarchy.
  * See the Gradle build script in the `endorsed` directory for more information.
  */
 plugins {
-    id("sis.library-conventions")
-    id("org.apache.sis.buildtools")
     antlr
+    `java-library`
+    `maven-publish`     // For local deployment only. Not to be published on Maven Central.
+    id("net.linguica.maven-settings") version "0.5"
+    id("org.apache.sis.buildtools")
 }
 
 /*
@@ -149,4 +153,12 @@ publishing {
             }
         }
     }
+    /* Following block is currently repeated in all sub-projects. */
+    repositories {
+        maven {
+            val stage = if (version.toString().endsWith("SNAPSHOT")) "snapshots" else "releases"
+            name = providers.gradleProperty("${stage}Id").get()
+            url = uri(providers.gradleProperty("${stage}URL").get())
+        }
+    }
 }
diff --git a/optional/build.gradle.kts b/optional/build.gradle.kts
index b813615a6f..323605fdb8 100644
--- a/optional/build.gradle.kts
+++ b/optional/build.gradle.kts
@@ -14,6 +14,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+group = "org.apache.sis"
+// The version is specified in `gradle.properties`.
 
 val pathToFX = System.getenv("PATH_TO_FX")
 if (pathToFX == null) {
@@ -28,7 +30,10 @@ if (!File(pathToFX, "javafx.base.jar").isFile()) {
  * See the Gradle build script in the `endorsed` directory for more information.
  */
 plugins {
-    id("sis.library-conventions")
+    `java-library`
+    `maven-publish`
+    signing
+    id("net.linguica.maven-settings") version "0.5"
     id("org.apache.sis.buildtools")
 }
 
@@ -171,6 +176,14 @@ publishing {
             }
         }
     }
+    /* Following block is currently repeated in all sub-projects. */
+    repositories {
+        maven {
+            val stage = if (version.toString().endsWith("SNAPSHOT")) "snapshots" else "releases"
+            name = providers.gradleProperty("${stage}Id").get()
+            url = uri(providers.gradleProperty("${stage}URL").get())
+        }
+    }
 }
 
 signing {