Fix prepare_release_config build step on Windows
On Windows OS, the build was failing due to a bug
in Gradle
For a workaround, we use a different way of
copying the properties file.
Closes from aplex/windows-build-fix
@@ -34,20 +34,22 @@ println String.format("Release Version: %s", releaseVersion)
// Modify the gradle.properties to indicate whether this is a release. This results in the
// source releases generating artifacts without -SNAPSHOT appended to the version when they are
// built.
-task prepare_release_config(type: Copy) {
+task prepare_release_config() {
+ project.copy {
from "$rootDir/gradle.properties"
into "$rootDir"
rename { filename ->
- filename + ".release" }
+ filename + ".release"
+ }
filter { line ->
if (isRelease && line.startsWith("release=")) {
"release=true"
- }
- else {
+ } else {
line
}
}
}
+}
task sourceRelease(type: Tar, dependsOn: prepare_release_config) {
description = "Build a source release, specifically excluding the build directories and gradle wrapper files"
