diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index bdc9a83b1..c30b486a8 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/groovy/com/github/jengelman/gradle/plugins/shadow/ShadowApplicationPlugin.groovy b/src/main/groovy/com/github/jengelman/gradle/plugins/shadow/ShadowApplicationPlugin.groovy index f7688c7f2..566e90f90 100644 --- a/src/main/groovy/com/github/jengelman/gradle/plugins/shadow/ShadowApplicationPlugin.groovy +++ b/src/main/groovy/com/github/jengelman/gradle/plugins/shadow/ShadowApplicationPlugin.groovy @@ -7,6 +7,7 @@ import org.gradle.api.Plugin import org.gradle.api.Project import org.gradle.api.distribution.Distribution import org.gradle.api.distribution.DistributionContainer +import org.gradle.api.file.CopyProcessingSpec import org.gradle.api.file.CopySpec import org.gradle.api.plugins.ApplicationPlugin import org.gradle.api.plugins.JavaApplication @@ -17,6 +18,7 @@ import org.gradle.api.tasks.TaskProvider import org.gradle.api.tasks.application.CreateStartScripts import org.gradle.jvm.toolchain.JavaLauncher import org.gradle.jvm.toolchain.JavaToolchainService +import org.gradle.util.GradleVersion class ShadowApplicationPlugin implements Plugin { @@ -126,7 +128,9 @@ class ShadowApplicationPlugin implements Plugin { } into("bin") { from(startScripts) - fileMode = 493 + filePermissions { + it.unix(493) + } } } diff --git a/src/main/groovy/com/github/jengelman/gradle/plugins/shadow/ShadowBasePlugin.groovy b/src/main/groovy/com/github/jengelman/gradle/plugins/shadow/ShadowBasePlugin.groovy index 1f7a3a7d4..8121e123f 100644 --- a/src/main/groovy/com/github/jengelman/gradle/plugins/shadow/ShadowBasePlugin.groovy +++ b/src/main/groovy/com/github/jengelman/gradle/plugins/shadow/ShadowBasePlugin.groovy @@ -13,8 +13,8 @@ class ShadowBasePlugin implements Plugin { @Override void apply(Project project) { - if (GradleVersion.current() < GradleVersion.version("8.0")) { - throw new GradleException("This version of Shadow supports Gradle 8.0+ only. Please upgrade.") + if (GradleVersion.current() < GradleVersion.version("8.3")) { + throw new GradleException("This version of Shadow supports Gradle 8.3+ only. Please upgrade.") } project.extensions.create(EXTENSION_NAME, ShadowExtension, project) createShadowConfiguration(project) diff --git a/src/main/groovy/com/github/jengelman/gradle/plugins/shadow/tasks/ShadowCopyAction.groovy b/src/main/groovy/com/github/jengelman/gradle/plugins/shadow/tasks/ShadowCopyAction.groovy index 4c3f07142..694ed49c0 100644 --- a/src/main/groovy/com/github/jengelman/gradle/plugins/shadow/tasks/ShadowCopyAction.groovy +++ b/src/main/groovy/com/github/jengelman/gradle/plugins/shadow/tasks/ShadowCopyAction.groovy @@ -19,6 +19,7 @@ import org.gradle.api.Action import org.gradle.api.GradleException import org.gradle.api.UncheckedIOException import org.gradle.api.file.FileCopyDetails +import org.gradle.api.file.FilePermissions import org.gradle.api.file.FileTreeElement import org.gradle.api.file.RelativePath import org.gradle.api.internal.DocumentationRegistry @@ -510,6 +511,11 @@ class ShadowCopyAction implements CopyAction { return false } + @Override + FilePermissions getPermissions() { + return null + } + @Override String getName() { return archivePath.pathString diff --git a/src/test/groovy/com/github/jengelman/gradle/plugins/shadow/ApplicationSpec.groovy b/src/test/groovy/com/github/jengelman/gradle/plugins/shadow/ApplicationSpec.groovy index 04e4b78c8..f23dd21a7 100644 --- a/src/test/groovy/com/github/jengelman/gradle/plugins/shadow/ApplicationSpec.groovy +++ b/src/test/groovy/com/github/jengelman/gradle/plugins/shadow/ApplicationSpec.groovy @@ -29,7 +29,7 @@ class ApplicationSpec extends PluginSpecification { buildFile << """ apply plugin: 'application' - mainClassName = 'myapp.Main' + application.mainClass = 'myapp.Main' dependencies { implementation 'shadow:a:1.0' @@ -90,7 +90,7 @@ class ApplicationSpec extends PluginSpecification { buildFile << """ apply plugin: 'application' - mainClassName = 'myapp.Main' + application.mainClass = 'myapp.Main' dependencies { implementation 'shadow:a:1.0' @@ -169,7 +169,7 @@ class ApplicationSpec extends PluginSpecification { buildFile << """ apply plugin: 'application' - mainClassName = 'myapp.Main' + application.mainClass = 'myapp.Main' dependencies { shadow 'shadow:a:1.0' @@ -219,7 +219,7 @@ class ApplicationSpec extends PluginSpecification { buildFile << """ apply plugin: 'application' - mainClassName = 'myapp.Main' + application.mainClass = 'myapp.Main' dependencies { implementation 'shadow:a:1.0' diff --git a/src/test/groovy/com/github/jengelman/gradle/plugins/shadow/ConfigurationCacheSpec.groovy b/src/test/groovy/com/github/jengelman/gradle/plugins/shadow/ConfigurationCacheSpec.groovy index b2476e59b..1829944dc 100644 --- a/src/test/groovy/com/github/jengelman/gradle/plugins/shadow/ConfigurationCacheSpec.groovy +++ b/src/test/groovy/com/github/jengelman/gradle/plugins/shadow/ConfigurationCacheSpec.groovy @@ -35,7 +35,7 @@ class ConfigurationCacheSpec extends PluginSpecification { buildFile << """ apply plugin: 'application' - mainClassName = 'myapp.Main' + application.mainClass = 'myapp.Main' dependencies { implementation 'shadow:a:1.0' diff --git a/src/test/groovy/com/github/jengelman/gradle/plugins/shadow/ShadowPluginSpec.groovy b/src/test/groovy/com/github/jengelman/gradle/plugins/shadow/ShadowPluginSpec.groovy index c268ffd9a..e5cbaeabe 100644 --- a/src/test/groovy/com/github/jengelman/gradle/plugins/shadow/ShadowPluginSpec.groovy +++ b/src/test/groovy/com/github/jengelman/gradle/plugins/shadow/ShadowPluginSpec.groovy @@ -86,7 +86,7 @@ class ShadowPluginSpec extends PluginSpecification { assert output.exists() where: - version << ['8.0'] + version << ['8.3'] } def 'Error in Gradle versions < 8.0'() {