You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: libraries/apollo-gradle-plugin-external/src/main/kotlin/com/apollographql/apollo/gradle/internal/DefaultApolloExtension.kt
+16-7Lines changed: 16 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -278,8 +278,15 @@ abstract class DefaultApolloExtension(
278
278
null-> { // default: automatic detection
279
279
project.configurations.configureEach {
280
280
it.dependencies.configureEach {
281
-
// Try to detect if a native version of apollo-normalized-cache-sqlite is in the classpath
282
-
if (it.group?.contains("apollo") ==true
281
+
/*
282
+
* Try to detect if a native version of apollo-normalized-cache-sqlite is in the classpath
283
+
* This is a heuristic and will not work in 100% of the cases.
284
+
*
285
+
* Note: we only check external dependencies as reading the group of project dependencies
286
+
* is not compatible with isolated projects
287
+
*/
288
+
if (it isExternalModuleDependency
289
+
&& it.group?.contains("apollo") ==true
283
290
&& it.name.contains("normalized-cache-sqlite")
284
291
&&!it.name.contains("jvm")
285
292
&&!it.name.contains("android")) {
@@ -360,10 +367,8 @@ abstract class DefaultApolloExtension(
Copy file name to clipboardExpand all lines: libraries/apollo-gradle-plugin-external/src/main/kotlin/com/apollographql/apollo/gradle/internal/KotlinPluginFacade.kt
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -43,6 +43,13 @@ fun Project.apolloGetKotlinPluginVersion(): String? {
Copy file name to clipboardExpand all lines: libraries/apollo-gradle-plugin/src/test-java11/kotlin/com/apollographql/apollo/gradle/test/GradleToolingTests.kt
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,8 @@ class GradleToolingTests {
74
74
75
75
@Test
76
76
fun`tooling model exposes apollo metadata dependencies`() {
77
-
TestUtils.withTestProject("multi-modules-diamond") { dir ->
77
+
testProjectWithIsolatedProjectsWorkaround("multi-modules-diamond") { dir ->
Copy file name to clipboardExpand all lines: libraries/apollo-gradle-plugin/src/test-java11/kotlin/com/apollographql/apollo/gradle/test/KotlinPluginVersionTests.kt
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,7 @@ import util.TestUtils
4
4
importcom.google.common.truth.Truth
5
5
importorg.gradle.testkit.runner.TaskOutcome
6
6
importorg.junit.Test
7
+
importutil.disableIsolatedProjects
7
8
importjava.io.File
8
9
9
10
classKotlinPluginVersionTests {
@@ -14,6 +15,8 @@ class KotlinPluginVersionTests {
14
15
@Test
15
16
fun`kotlin JVM min version succeeds`() {
16
17
TestUtils.withTestProject("kotlin-plugin-version-min") { dir ->
18
+
dir.disableIsolatedProjects() // old KGP versions do not support isolated projects
Copy file name to clipboardExpand all lines: libraries/apollo-gradle-plugin/src/test-java11/kotlin/com/apollographql/apollo/gradle/test/LanguageVersionTests.kt
Copy file name to clipboardExpand all lines: libraries/apollo-gradle-plugin/src/test-java11/kotlin/com/apollographql/apollo/gradle/test/MultiModulesTests.kt
0 commit comments