-
Notifications
You must be signed in to change notification settings - Fork 399
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unmute Android unit tests for Java 11
- Loading branch information
1 parent
10c220b
commit 9b9871d
Showing
4 changed files
with
33 additions
and
11 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
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
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
18 changes: 18 additions & 0 deletions
18
...runner-gradle-plugin-classic/src/test/kotlin/org/jetbrains/dokka/gradle/utils/AgpUtils.kt
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,18 @@ | ||
/* | ||
* Copyright 2014-2024 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. | ||
*/ | ||
|
||
package org.jetbrains.dokka.gradle.utils | ||
|
||
/** | ||
* AGP 7+ is compiled with Java 8, but requires Java 11+ to run: | ||
* | ||
* > EvalIssueException: Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8. | ||
*/ | ||
fun isAgpRunnable(): Boolean { | ||
val javaVersion = when (val specVersion = System.getProperty("java.specification.version")) { | ||
"1.8" -> 8 | ||
else -> specVersion.toInt() | ||
} | ||
return javaVersion >= 11 | ||
} |