diff --git a/core/build.gradle.kts b/core/build.gradle.kts index c492b5b0..9b6299be 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -41,6 +41,7 @@ dependencies { implementation(libs.androidx.documentfile) implementation(libs.rhino) + implementation(project(":stub")) implementation(project(":mapper")) implementation(project(":native")) } \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index 132f3f5d..23cfaf9b 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -21,3 +21,4 @@ include(":core") include(":app") include(":mapper") include(":native") +include(":stub") \ No newline at end of file diff --git a/stub/.gitignore b/stub/.gitignore new file mode 100644 index 00000000..42afabfd --- /dev/null +++ b/stub/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/stub/build.gradle.kts b/stub/build.gradle.kts new file mode 100644 index 00000000..ad410228 --- /dev/null +++ b/stub/build.gradle.kts @@ -0,0 +1,14 @@ +plugins { + alias(libs.plugins.androidLibrary) + alias(libs.plugins.kotlinAndroid) +} + + +android { + namespace = rootProject.ext["applicationId"].toString() + ".stub" + compileSdk = 34 + + kotlinOptions { + jvmTarget = "1.8" + } +} diff --git a/stub/src/main/java/javax/lang/model/SourceVersion.java b/stub/src/main/java/javax/lang/model/SourceVersion.java new file mode 100644 index 00000000..0adde3e3 --- /dev/null +++ b/stub/src/main/java/javax/lang/model/SourceVersion.java @@ -0,0 +1,23 @@ +package javax.lang.model; + +// Rhino misses this class in the android platform +@SuppressWarnings("unused") +public enum SourceVersion { + RELEASE_0, + RELEASE_1, + RELEASE_2, + RELEASE_3, + RELEASE_4, + RELEASE_5, + RELEASE_6, + RELEASE_7, + RELEASE_8, + RELEASE_9, + RELEASE_10, + RELEASE_11; + + @SuppressWarnings("unused") + public static SourceVersion latestSupported() { + return RELEASE_8; + } +}