Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into g/lazy-properties
Browse files Browse the repository at this point in the history
// Conflicts:
//	.editorconfig
//	src/test/groovy/com/github/jengelman/gradle/plugins/shadow/TransformerSpec.groovy
  • Loading branch information
Goooler committed Nov 26, 2024
2 parents c2ef453 + db1ae87 commit 8d1347b
Show file tree
Hide file tree
Showing 40 changed files with 607 additions and 599 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.groovy]
[*.{groovy,java}]
indent_size = 4

[*.{kt,kts}]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ class ApplicationSpec extends PluginSpecification {
def 'integration with application plugin'() {
given:
repo.module('shadow', 'a', '1.0')
.insertFile('a.properties', 'a')
.insertFile('a2.properties', 'a2')
.publish()
.insertFile('a.properties', 'a')
.insertFile('a2.properties', 'a2')
.publish()

file('src/main/java/myapp/Main.java') << """
package myapp;
Expand All @@ -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 @@ -76,9 +76,9 @@ class ApplicationSpec extends PluginSpecification {
def 'integration with application plugin and java toolchains'() {
given:
repo.module('shadow', 'a', '1.0')
.insertFile('a.properties', 'a')
.insertFile('a2.properties', 'a2')
.publish()
.insertFile('a.properties', 'a')
.insertFile('a2.properties', 'a2')
.publish()

file('src/main/java/myapp/Main.java') << """
package myapp;
Expand All @@ -91,35 +91,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 Down Expand Up @@ -157,9 +157,9 @@ class ApplicationSpec extends PluginSpecification {
def 'shadow application distributions should use shadow jar'() {
given:
repo.module('shadow', 'a', '1.0')
.insertFile('a.properties', 'a')
.insertFile('a2.properties', 'a2')
.publish()
.insertFile('a.properties', 'a')
.insertFile('a2.properties', 'a2')
.publish()

file('src/main/java/myapp/Main.java') << """
package myapp;
Expand All @@ -176,11 +176,11 @@ class ApplicationSpec extends PluginSpecification {
application {
mainClass = 'myapp.Main'
}
dependencies {
shadow 'shadow:a:1.0'
}
runShadow {
args 'foo'
}
Expand Down Expand Up @@ -209,9 +209,9 @@ class ApplicationSpec extends PluginSpecification {
def 'installShadow does not execute dependent shadow task'() {
given:
repo.module('shadow', 'a', '1.0')
.insertFile('a.properties', 'a')
.insertFile('a2.properties', 'a2')
.publish()
.insertFile('a.properties', 'a')
.insertFile('a2.properties', 'a2')
.publish()

file('src/main/java/myapp/Main.java') << """
package myapp;
Expand All @@ -228,11 +228,11 @@ class ApplicationSpec extends PluginSpecification {
application {
mainClass = 'myapp.Main'
}
dependencies {
implementation 'shadow:a:1.0'
}
runShadow {
args 'foo'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ class ConfigurationCacheSpec extends PluginSpecification {
@Override
def setup() {
repo.module('shadow', 'a', '1.0')
.insertFile('a.properties', 'a')
.insertFile('a2.properties', 'a2')
.publish()
.insertFile('a.properties', 'a')
.insertFile('a2.properties', 'a2')
.publish()
repo.module('shadow', 'b', '1.0')
.insertFile('b.properties', 'b')
.publish()
.insertFile('b.properties', 'b')
.publish()

buildFile << """
dependencies {
Expand All @@ -39,11 +39,11 @@ class ConfigurationCacheSpec extends PluginSpecification {
application {
mainClass = 'myapp.Main'
}
dependencies {
implementation 'shadow:a:1.0'
}
runShadow {
args 'foo'
}
Expand Down Expand Up @@ -127,8 +127,8 @@ class ConfigurationCacheSpec extends PluginSpecification {
then:
output.exists()
contains(output, [
'server/Server.class',
'junit/framework/Test.class'
'server/Server.class',
'junit/framework/Test.class'
])
doesNotContain(output, ['client/Client.class'])

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@ class ConfigureShadowRelocationSpec extends PluginSpecification {

then:
contains(output, [
'META-INF/MANIFEST.MF',
'shadow/junit/textui/ResultPrinter.class',
'shadow/junit/textui/TestRunner.class',
'shadow/junit/framework/Assert.class',
'shadow/junit/framework/AssertionFailedError.class',
'shadow/junit/framework/ComparisonCompactor.class',
'shadow/junit/framework/ComparisonFailure.class',
'shadow/junit/framework/Protectable.class',
'shadow/junit/framework/Test.class',
'shadow/junit/framework/TestCase.class',
'shadow/junit/framework/TestFailure.class',
'shadow/junit/framework/TestListener.class',
'shadow/junit/framework/TestResult$1.class',
'shadow/junit/framework/TestResult.class',
'shadow/junit/framework/TestSuite$1.class',
'shadow/junit/framework/TestSuite.class'
'META-INF/MANIFEST.MF',
'shadow/junit/textui/ResultPrinter.class',
'shadow/junit/textui/TestRunner.class',
'shadow/junit/framework/Assert.class',
'shadow/junit/framework/AssertionFailedError.class',
'shadow/junit/framework/ComparisonCompactor.class',
'shadow/junit/framework/ComparisonFailure.class',
'shadow/junit/framework/Protectable.class',
'shadow/junit/framework/Test.class',
'shadow/junit/framework/TestCase.class',
'shadow/junit/framework/TestFailure.class',
'shadow/junit/framework/TestListener.class',
'shadow/junit/framework/TestResult$1.class',
'shadow/junit/framework/TestResult.class',
'shadow/junit/framework/TestSuite$1.class',
'shadow/junit/framework/TestSuite.class'
])
}
}
Loading

0 comments on commit 8d1347b

Please sign in to comment.