File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2026 David Allison <davidallisongithub@gmail.com>
3+ *
4+ * This program is free software; you can redistribute it and/or modify it under
5+ * the terms of the GNU General Public License as published by the Free Software
6+ * Foundation; either version 3 of the License, or (at your option) any later
7+ * version.
8+ *
9+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY
10+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11+ * PARTICULAR PURPOSE. See the GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License along with
14+ * this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+ // Convention plugin: applies the Kotlin JVM plugin and pins Java/Kotlin
18+ // toolchain settings for pure-JVM (non-Android) modules in this project.
19+
20+ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
21+ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
22+
23+ plugins {
24+ id(" org.jetbrains.kotlin.jvm" )
25+ }
26+
27+ tasks.withType(JavaCompile ::class ).configureEach {
28+ sourceCompatibility = JavaVersion .VERSION_17 .toString()
29+ targetCompatibility = JavaVersion .VERSION_17 .toString()
30+ }
31+
32+ tasks.withType(KotlinCompile ::class ).configureEach {
33+ compilerOptions {
34+ jvmTarget = JvmTarget .JVM_17
35+ }
36+ }
Original file line number Diff line number Diff line change 1- import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2-
31plugins {
4- // Use `id` to avoid classpath conflicts. Versions are pinned by buildSrc/.
5- id(" org.jetbrains.kotlin.jvm" )
2+ id(" ankidroid.kotlin-jvm" )
63 `java- test- fixtures`
74}
85
9- java {
10- sourceCompatibility = JavaVersion .VERSION_17
11- targetCompatibility = JavaVersion .VERSION_17
12- }
13-
14- kotlin {
15- compilerOptions {
16- jvmTarget = JvmTarget .JVM_17
17- }
18- }
19-
206dependencies {
217 implementation(libs.json)
228 implementation(libs.androidx.annotation)
Original file line number Diff line number Diff line change 1- import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2- import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
3-
41plugins {
5- id(" kotlin" )
6- }
7-
8- tasks.withType(JavaCompile ::class ).configureEach {
9- sourceCompatibility = JavaVersion .VERSION_17 .toString()
10- targetCompatibility = JavaVersion .VERSION_17 .toString()
11- }
12-
13- tasks.withType(KotlinCompile ::class ).all {
14- compilerOptions {
15- jvmTarget = JvmTarget .JVM_17
16- }
2+ id(" ankidroid.kotlin-jvm" )
173}
184
195dependencies {
You can’t perform that action at this time.
0 commit comments