You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by nt...@apache.org on 2025/03/27 13:58:07 UTC
(cayenne) branch STABLE-4.2 updated (36b766fd8 -> 89cffc72a)
This is an automated email from the ASF dual-hosted git repository.
ntimofeev pushed a change to branch STABLE-4.2
in repository https://gitbox.apache.org/repos/asf/cayenne.git
from 36b766fd8 [maven-release-plugin] prepare for next development iteration
new 99c3d61e5 CAY-2883 License and notice templates are not processed by the Gradle build
new 89cffc72a CAY-2884 Upgrade gradle to 8.13
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:
cayenne-gradle-plugin/build.gradle | 57 ++++++++++++++++-----
.../gradle/wrapper/gradle-wrapper.jar | Bin 43453 -> 43705 bytes
.../gradle/wrapper/gradle-wrapper.properties | 2 +-
cayenne-gradle-plugin/gradlew | 6 ++-
cayenne-gradle-plugin/gradlew.bat | 2 +
5 files changed, 52 insertions(+), 15 deletions(-)
(cayenne) 02/02: CAY-2884 Upgrade gradle to 8.13
Posted by nt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ntimofeev pushed a commit to branch STABLE-4.2
in repository https://gitbox.apache.org/repos/asf/cayenne.git
commit 89cffc72a2d24581baaaa649ae05bf26d67ac609
Author: Nikita Timofeev <st...@gmail.com>
AuthorDate: Thu Mar 27 17:57:55 2025 +0400
CAY-2884 Upgrade gradle to 8.13
---
.../gradle/wrapper/gradle-wrapper.jar | Bin 43453 -> 43705 bytes
.../gradle/wrapper/gradle-wrapper.properties | 2 +-
cayenne-gradle-plugin/gradlew | 6 ++++--
cayenne-gradle-plugin/gradlew.bat | 2 ++
4 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/cayenne-gradle-plugin/gradle/wrapper/gradle-wrapper.jar b/cayenne-gradle-plugin/gradle/wrapper/gradle-wrapper.jar
index e6441136f..9bbc975c7 100644
Binary files a/cayenne-gradle-plugin/gradle/wrapper/gradle-wrapper.jar and b/cayenne-gradle-plugin/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/cayenne-gradle-plugin/gradle/wrapper/gradle-wrapper.properties b/cayenne-gradle-plugin/gradle/wrapper/gradle-wrapper.properties
index b56c2d746..bc93d83c6 100644
--- a/cayenne-gradle-plugin/gradle/wrapper/gradle-wrapper.properties
+++ b/cayenne-gradle-plugin/gradle/wrapper/gradle-wrapper.properties
@@ -15,7 +15,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
diff --git a/cayenne-gradle-plugin/gradlew b/cayenne-gradle-plugin/gradlew
index b740cf133..faf93008b 100755
--- a/cayenne-gradle-plugin/gradlew
+++ b/cayenne-gradle-plugin/gradlew
@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
+# SPDX-License-Identifier: Apache-2.0
+#
##############################################################################
#
@@ -84,7 +86,7 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
-APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
+APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@@ -203,7 +205,7 @@ fi
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command:
-# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
+# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
diff --git a/cayenne-gradle-plugin/gradlew.bat b/cayenne-gradle-plugin/gradlew.bat
index 7101f8e46..9b42019c7 100644
--- a/cayenne-gradle-plugin/gradlew.bat
+++ b/cayenne-gradle-plugin/gradlew.bat
@@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
+@rem SPDX-License-Identifier: Apache-2.0
+@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
(cayenne) 01/02: CAY-2883 License and notice templates are not processed by the Gradle build
Posted by nt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ntimofeev pushed a commit to branch STABLE-4.2
in repository https://gitbox.apache.org/repos/asf/cayenne.git
commit 99c3d61e55893cc196aac04c4c1417bfebe47723
Author: Nikita Timofeev <st...@gmail.com>
AuthorDate: Thu Mar 27 17:50:24 2025 +0400
CAY-2883 License and notice templates are not processed by the Gradle build
---
cayenne-gradle-plugin/build.gradle | 57 ++++++++++++++++++++++++++++++--------
1 file changed, 45 insertions(+), 12 deletions(-)
diff --git a/cayenne-gradle-plugin/build.gradle b/cayenne-gradle-plugin/build.gradle
index 4eb710cf2..dc37d4766 100644
--- a/cayenne-gradle-plugin/build.gradle
+++ b/cayenne-gradle-plugin/build.gradle
@@ -16,17 +16,20 @@
* specific language governing permissions and limitations
* under the License.
****************************************************************/
+buildscript {
+ dependencies {
+ classpath 'org.apache.velocity:velocity-engine-core:2.4.1'
+ }
+}
+
+import org.apache.velocity.VelocityContext
+import org.apache.velocity.app.VelocityEngine
+
plugins {
id 'java-gradle-plugin'
id 'java'
}
-def projectVersion = getProjectVersion()
-
-group 'org.apache.cayenne.plugins'
-version projectVersion
-def cayenneVersion = version
-
java {
sourceCompatibility = JavaVersion.VERSION_1_8
}
@@ -36,6 +39,17 @@ repositories {
mavenCentral()
}
+dependencies {
+ implementation gradleApi()
+ implementation localGroovy()
+}
+
+def projectVersion = getProjectVersion()
+
+group 'org.apache.cayenne.plugins'
+version projectVersion
+def cayenneVersion = version
+
def getProjectVersion() {
def pomFile = file('pom.xml')
if (pomFile.file) {
@@ -53,11 +67,6 @@ if (classpathFile.file) {
}
}
-dependencies {
- implementation gradleApi()
- implementation localGroovy()
-}
-
// Create file with cayenne-gradle-plugin version
task versionFile {
def resourceOutputDir = file("$buildDir/resources/main/")
@@ -69,10 +78,34 @@ task versionFile {
}
}
+def processLicenseFile(fileName) {
+ def context = new VelocityContext(Map.of("binary", false))
+ def outputWriter = new FileWriter(new File("$buildDir/resources/main/META-INF/cayenne/${fileName}.txt"))
+ def template
+ def templateFile = new File("$buildDir/resources/tpl/META-INF/cayenne/${fileName}.txt.vm");
+ if(templateFile.exists()) {
+ template = templateFile.text
+ } else {
+ throw new RuntimeException("Template file `$buildDir/resources/tpl/META-INF/cayenne/${fileName}.txt.vm` doesn't exist")
+ }
+
+ try {
+ new VelocityEngine().evaluate(context, outputWriter, fileName, template)
+ outputWriter.flush()
+ } finally {
+ outputWriter.close()
+ }
+}
+
// Copy license and notice files
task licenseFiles(type: Copy) {
from '../build-tools/cayenne-legal/src/main/resources/'
- into "$buildDir/resources/main/"
+ into "$buildDir/resources/tpl/"
+ doLast {
+ mkdir("$buildDir/resources/main/META-INF/cayenne/")
+ processLicenseFile("LICENSE")
+ processLicenseFile("NOTICE")
+ }
}
task sourcesJar(type: Jar, dependsOn: classes) {