Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/docs/changes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

## [Unreleased]

**Changed**

- Stop using start script templates bundled in Shadow. ([#1750](https://github.com/GradleUp/shadow/pull/1750))

**Fixed**

- Fix resolving BOM dependencies when `minimize` is enabled. ([#1638](https://github.com/GradleUp/shadow/pull/1638))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ class ShadowApplicationPlugin implements Plugin<Project> {

protected void addCreateScriptsTask(Project project) {
project.tasks.register(SHADOW_SCRIPTS_TASK_NAME, CreateStartScripts) { startScripts ->
startScripts.unixStartScriptGenerator.template = project.resources.text.fromString(this.class.getResource("internal/unixStartScript.txt").text)
startScripts.windowsStartScriptGenerator.template = project.resources.text.fromString(this.class.getResource("internal/windowsStartScript.txt").text)
startScripts.description = 'Creates OS specific scripts to run the project as a JVM application using the shadow jar'
startScripts.group = ApplicationPlugin.APPLICATION_GROUP
startScripts.classpath = project.files(jar)
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ class ApplicationSpec extends PluginSpecification {
application {
mainClass = 'myapp.Main'
}

dependencies {
implementation 'shadow:a:1.0'
}

runShadow {
args 'foo'
}
Expand Down Expand Up @@ -66,7 +66,6 @@ class ApplicationSpec extends PluginSpecification {
File startScript = getFile('build/install/myapp-shadow/bin/myapp')
assert startScript.exists()
assert startScript.text.contains("CLASSPATH=\$APP_HOME/lib/myapp-1.0-all.jar")
assert startScript.text.contains("-jar \"\\\"\$CLASSPATH\\\"\" \"\$APP_ARGS\"")
assert startScript.text.contains("exec \"\$JAVACMD\" \"\$@\"")

cleanup:
Expand All @@ -91,35 +90,35 @@ class ApplicationSpec extends PluginSpecification {

buildFile << """
apply plugin: 'application'

application {
mainClass = 'myapp.Main'
}

dependencies {
implementation 'shadow:a:1.0'
}

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}

runShadow {
args 'foo'
doFirst {
logger.lifecycle("Running application with JDK \${it.javaLauncher.get().metadata.languageVersion.asInt()}")
}
}
}
""".stripIndent()

settingsFile.write """
settingsFile.write """
plugins {
// https://docs.gradle.org/8.0.1/userguide/toolchains.html#sub:download_repositories
id("org.gradle.toolchains.foojay-resolver-convention") version("0.7.0")
}

rootProject.name = 'myapp'
""".stripIndent()

Expand All @@ -146,7 +145,6 @@ class ApplicationSpec extends PluginSpecification {
File startScript = getFile('build/install/myapp-shadow/bin/myapp')
assert startScript.exists()
assert startScript.text.contains("CLASSPATH=\$APP_HOME/lib/myapp-1.0-all.jar")
assert startScript.text.contains("-jar \"\\\"\$CLASSPATH\\\"\" \"\$APP_ARGS\"")
assert startScript.text.contains("exec \"\$JAVACMD\" \"\$@\"")

cleanup:
Expand Down Expand Up @@ -176,11 +174,11 @@ class ApplicationSpec extends PluginSpecification {
application {
mainClass = 'myapp.Main'
}

dependencies {
shadow 'shadow:a:1.0'
}

runShadow {
args 'foo'
}
Expand Down Expand Up @@ -228,11 +226,11 @@ class ApplicationSpec extends PluginSpecification {
application {
mainClass = 'myapp.Main'
}

dependencies {
implementation 'shadow:a:1.0'
}

runShadow {
args 'foo'
}
Expand Down
Loading