-
Notifications
You must be signed in to change notification settings - Fork 578
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for configuration cache bug
This is a test for the scenario in #2837 which has since been fixed already.
- Loading branch information
Showing
4 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
wire-gradle-plugin/src/test/projects/configuration-cache-failure/build.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
plugins { | ||
id("com.squareup.wire") | ||
id("org.jetbrains.kotlin.jvm") version "1.9.22" | ||
} | ||
|
||
val genProtosDir = "$buildDir/generated/proto" | ||
|
||
tasks.register("genProto") { | ||
val outFile = project.file("$genProtosDir/period.proto") | ||
outputs.file(outFile) | ||
doLast { | ||
outFile.writeText(""" | ||
syntax = "proto2"; | ||
enum Period { | ||
CRETACEOUS = 1; | ||
} | ||
""") | ||
} | ||
} | ||
|
||
tasks.matching { it.name == "generateMainProtos" }.configureEach { | ||
dependsOn("genProto") | ||
} | ||
|
||
wire { | ||
sourcePath { | ||
srcDir("src/main/proto/") | ||
} | ||
|
||
sourcePath { | ||
srcDir(genProtosDir) | ||
} | ||
|
||
kotlin { | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
wire-gradle-plugin/src/test/projects/configuration-cache-failure/gradle.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
org.gradle.caching=false | ||
org.gradle.unsafe.configuration-cache=true | ||
org.gradle.configuration-cache=true | ||
VERSION_NAME=5.0.0-SNAPSHOT |
7 changes: 7 additions & 0 deletions
7
...gradle-plugin/src/test/projects/configuration-cache-failure/src/main/proto/dinosaur.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
syntax = "proto2"; | ||
|
||
import "period.proto"; | ||
|
||
message Dinosaur { | ||
optional Period period = 5; | ||
} |