Skip to content

Commit ad43f2c

Browse files
committed
Source compatibility for JVM 1.8
1 parent 90801f0 commit ad43f2c

File tree

10 files changed

+56
-22
lines changed

10 files changed

+56
-22
lines changed

bugsnag-ios-link/build.gradle.kts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@ dependencies {
4848
}
4949

5050
java {
51-
sourceCompatibility = JavaVersion.VERSION_17
52-
targetCompatibility = JavaVersion.VERSION_17
51+
toolchain {
52+
languageVersion.set(JavaLanguageVersion.of(8))
53+
}
5354
}
5455

5556
val GROUP: String by project

bugsnag/build.gradle.kts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
* or implied. See the License for the specific language governing permissions and limitations under
1111
* the License.
1212
*/
13+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
1314

1415
plugins {
1516
id("com.android.library")
@@ -44,7 +45,7 @@ kotlin {
4445
tvosArm64()
4546
tvosSimulatorArm64()
4647
tvosX64()
47-
48+
4849
sourceSets {
4950
val commonMain by getting {
5051
dependencies {
@@ -86,7 +87,7 @@ kotlin {
8687
compilerOpts("-DNS_FORMAT_ARGUMENT(A)=", "-D_Nullable_result=_Nullable")
8788
// extraOpts("-mode", "sourcecode")
8889
}
89-
}
90+
}
9091
}
9192
}
9293

@@ -97,7 +98,12 @@ android {
9798
minSdk = libs.versions.minSdk.get().toInt()
9899
}
99100
compileOptions {
100-
sourceCompatibility = JavaVersion.VERSION_17
101-
targetCompatibility = JavaVersion.VERSION_17
101+
sourceCompatibility = JavaVersion.VERSION_1_8
102+
targetCompatibility = JavaVersion.VERSION_1_8
102103
}
104+
105+
}
106+
107+
tasks.withType<KotlinCompile> {
108+
kotlinOptions.jvmTarget = "1.8"
103109
}

core/build.gradle.kts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
* or implied. See the License for the specific language governing permissions and limitations under
1111
* the License.
1212
*/
13+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
1314

1415
plugins {
1516
id("com.android.library")
@@ -74,9 +75,13 @@ android {
7475
minSdk = libs.versions.minSdk.get().toInt()
7576
}
7677
compileOptions {
77-
sourceCompatibility = JavaVersion.VERSION_17
78-
targetCompatibility = JavaVersion.VERSION_17
78+
sourceCompatibility = JavaVersion.VERSION_1_8
79+
targetCompatibility = JavaVersion.VERSION_1_8
7980
}
8081
}
8182

83+
tasks.withType<KotlinCompile> {
84+
kotlinOptions.jvmTarget = "1.8"
85+
}
86+
8287
apply(plugin = "com.vanniktech.maven.publish")

crashlytics-ios-link/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
* or implied. See the License for the specific language governing permissions and limitations under
1111
* the License.
1212
*/
13-
1413
plugins {
1514
`kotlin-dsl`
1615
kotlin("jvm")
@@ -48,8 +47,9 @@ dependencies {
4847
}
4948

5049
java {
51-
sourceCompatibility = JavaVersion.VERSION_17
52-
targetCompatibility = JavaVersion.VERSION_17
50+
toolchain {
51+
languageVersion.set(JavaLanguageVersion.of(8))
52+
}
5353
}
5454

5555
val GROUP: String by project

crashlytics/build.gradle.kts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
* or implied. See the License for the specific language governing permissions and limitations under
1111
* the License.
1212
*/
13+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
1314

1415
plugins {
1516
id("com.android.library")
@@ -96,7 +97,11 @@ android {
9697
minSdk = libs.versions.minSdk.get().toInt()
9798
}
9899
compileOptions {
99-
sourceCompatibility = JavaVersion.VERSION_17
100-
targetCompatibility = JavaVersion.VERSION_17
100+
sourceCompatibility = JavaVersion.VERSION_1_8
101+
targetCompatibility = JavaVersion.VERSION_1_8
101102
}
102103
}
104+
105+
tasks.withType<KotlinCompile> {
106+
kotlinOptions.jvmTarget = "1.8"
107+
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ kotlin.code.style=official
55
SONATYPE_HOST=DEFAULT
66
RELEASE_SIGNING_ENABLED=true
77
GROUP=co.touchlab.crashkios
8-
VERSION_NAME=0.8.3
8+
VERSION_NAME=0.8.4
99

1010
POM_URL=https://github.com/touchlab/CrashKios
1111
POM_DESCRIPTION=Kotlin Native iOS Crash Report Library

samples/sample-bugsnag/app/build.gradle.kts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,11 @@ android {
3434
}
3535
}
3636
compileOptions {
37-
sourceCompatibility = JavaVersion.VERSION_17
38-
targetCompatibility = JavaVersion.VERSION_17
37+
sourceCompatibility = JavaVersion.VERSION_1_8
38+
targetCompatibility = JavaVersion.VERSION_1_8
39+
}
40+
kotlinOptions {
41+
jvmTarget = "1.8"
3942
}
4043
buildFeatures {
4144
viewBinding = true

samples/sample-bugsnag/shared/build.gradle.kts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
*
88
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
99
*/
10+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
1011

1112
plugins {
1213
id("com.android.library")
@@ -22,11 +23,15 @@ android {
2223
minSdk = projectLibs.versions.minSdk.get().toInt()
2324
}
2425
compileOptions {
25-
sourceCompatibility = JavaVersion.VERSION_17
26-
targetCompatibility = JavaVersion.VERSION_17
26+
sourceCompatibility = JavaVersion.VERSION_1_8
27+
targetCompatibility = JavaVersion.VERSION_1_8
2728
}
2829
}
2930

31+
tasks.withType<KotlinCompile> {
32+
kotlinOptions.jvmTarget = "1.8"
33+
}
34+
3035
version = "0.0.1"
3136

3237
kotlin {

samples/sample-crashlytics/app/build.gradle.kts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,11 @@ android {
3535
}
3636
}
3737
compileOptions {
38-
sourceCompatibility = JavaVersion.VERSION_17
39-
targetCompatibility = JavaVersion.VERSION_17
38+
sourceCompatibility = JavaVersion.VERSION_1_8
39+
targetCompatibility = JavaVersion.VERSION_1_8
40+
}
41+
kotlinOptions {
42+
jvmTarget = "1.8"
4043
}
4144
buildFeatures {
4245
viewBinding = true

samples/sample-crashlytics/shared/build.gradle.kts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
*
88
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
99
*/
10+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
11+
1012
plugins {
1113
id("com.android.library")
1214
kotlin("multiplatform")
@@ -21,11 +23,15 @@ android {
2123
minSdk = projectLibs.versions.minSdk.get().toInt()
2224
}
2325
compileOptions {
24-
sourceCompatibility = JavaVersion.VERSION_17
25-
targetCompatibility = JavaVersion.VERSION_17
26+
sourceCompatibility = JavaVersion.VERSION_1_8
27+
targetCompatibility = JavaVersion.VERSION_1_8
2628
}
2729
}
2830

31+
tasks.withType<KotlinCompile> {
32+
kotlinOptions.jvmTarget = "1.8"
33+
}
34+
2935
version = "0.1.2"
3036

3137
kotlin {

0 commit comments

Comments
 (0)