File tree Expand file tree Collapse file tree 2 files changed +36
-140
lines changed
src/funcTest/kotlin/com/github/jengelman/gradle/plugins/shadow Expand file tree Collapse file tree 2 files changed +36
-140
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -773,6 +773,42 @@ class ShadowPluginTest : BasePluginTest() {
773
773
assertThat(testJar.getEntry(" junit" )).isNotNull()
774
774
}
775
775
776
+ @Test
777
+ fun configurationCachingOfConfigurationsIsUpToDate () {
778
+ settingsScriptPath.appendText(
779
+ """
780
+ include 'lib'
781
+ """ .trimIndent(),
782
+ )
783
+ projectScriptPath.writeText(" " )
784
+
785
+ path(" lib/src/main/java/lib/Lib.java" ).writeText(
786
+ """
787
+ package lib;
788
+ public class Lib {}
789
+ """ .trimIndent(),
790
+ )
791
+ path(" lib/build.gradle" ).writeText(
792
+ """
793
+ ${getDefaultProjectBuildScript()}
794
+ dependencies {
795
+ implementation 'junit:junit:3.8.2'
796
+ }
797
+ $shadowJar {
798
+ configurations = [project.configurations.compileClasspath]
799
+ }
800
+ """ .trimIndent(),
801
+ )
802
+
803
+ val libShadowJarTask = " :lib:$SHADOW_JAR_TASK_NAME "
804
+ run (libShadowJarTask)
805
+ val result = run (libShadowJarTask)
806
+
807
+ assertThat(result.task(libShadowJarTask)).isNotNull()
808
+ .transform { it.outcome }.isEqualTo(TaskOutcome .UP_TO_DATE )
809
+ assertThat(result.output).contains(" Reusing configuration cache." )
810
+ }
811
+
776
812
private fun writeShadowedClientAndServerModules () {
777
813
writeClientAndServerModules()
778
814
path(" client/build.gradle" ).appendText(
You can’t perform that action at this time.
0 commit comments