Skip to content

Commit

Permalink
Workaround AGP not being able to run basic tasks because it cannot ma…
Browse files Browse the repository at this point in the history
…ke our lives any simpler it is for some reason forbidden
  • Loading branch information
mateuszkwiecinski committed Nov 3, 2023
1 parent f796030 commit a4b472f
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,17 @@ internal class AndroidApplicationPluginTest : WithGradleProjectTest() {
rootDirectory.apply {
resolve("settings.gradle").writeText("""include ":module1", ":module2" """)

rootBuildScript = resolve("build.gradle")
rootBuildScript = resolve("build.gradle") {
writeText("""
plugins {
id('com.starter.config')
}
commonConfig {
javaVersion = JavaVersion.VERSION_1_8 // workaround for http://issuetracker.google.com/issues/294137077
}
""".trimIndent())
}
module1Root = resolve("module1") {
val buildScript =
// language=groovy
Expand All @@ -45,7 +55,7 @@ internal class AndroidApplicationPluginTest : WithGradleProjectTest() {
}
dependencies {
testImplementation 'junit:junit:4.13'
testImplementation 'junit:junit:4.13.2'
}
""".trimIndent()
Expand Down Expand Up @@ -83,7 +93,7 @@ internal class AndroidApplicationPluginTest : WithGradleProjectTest() {
}
dependencies {
testImplementation 'junit:junit:4.13'
testImplementation 'junit:junit:4.13.2'
}
""".trimIndent(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,17 @@ internal class AndroidLibraryPluginTest : WithGradleProjectTest() {
mkdirs()
resolve("settings.gradle").writeText("""include ":module1", ":module2" """)

rootBuildScript = resolve("build.gradle")
rootBuildScript = resolve("build.gradle") {
writeText("""
plugins {
id('com.starter.config')
}
commonConfig {
javaVersion = JavaVersion.VERSION_1_8 // workaround for http://issuetracker.google.com/issues/294137077
}
""".trimIndent())
}
module1Root = resolve("module1") {
val buildScript =
// language=groovy
Expand All @@ -46,7 +56,7 @@ internal class AndroidLibraryPluginTest : WithGradleProjectTest() {
}
dependencies {
testImplementation 'junit:junit:4.13'
testImplementation 'junit:junit:4.13.2'
}
""".trimIndent()
Expand Down Expand Up @@ -88,7 +98,7 @@ internal class AndroidLibraryPluginTest : WithGradleProjectTest() {
}
dependencies {
testImplementation 'junit:junit:4.13'
testImplementation 'junit:junit:4.13.2'
}
""".trimIndent(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,17 @@ internal class ConfigurationCacheTest : WithGradleProjectTest() {
rootDirectory.apply {
resolve("settings.gradle").writeText("""include ':module1', ':module2' """)

resolve("build.gradle").writeText("")
resolve("build.gradle") {
writeText("""
plugins {
id('com.starter.config')
}
commonConfig {
javaVersion = JavaVersion.VERSION_1_8 // workaround for http://issuetracker.google.com/issues/294137077
}
""".trimIndent())
}
androidModuleRoot = resolve("module1") {
// language=groovy
val script =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ internal class KotlinLibraryPluginTest : WithGradleProjectTest() {
}
dependencies {
testImplementation 'junit:junit:4.13'
testImplementation 'junit:junit:4.13.2'
}
""".trimIndent(),
Expand All @@ -57,7 +57,7 @@ internal class KotlinLibraryPluginTest : WithGradleProjectTest() {
}
dependencies {
testImplementation 'junit:junit:4.13'
testImplementation 'junit:junit:4.13.2'
}
""".trimIndent(),
Expand Down

0 comments on commit a4b472f

Please sign in to comment.