From 6ad5820315d209052e5ef5258c0af7915c7b0d08 Mon Sep 17 00:00:00 2001 From: Cristian Zazo Date: Mon, 28 Aug 2023 10:11:33 +0200 Subject: [PATCH 1/3] Add AGP 8 support --- android/build.gradle | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/android/build.gradle b/android/build.gradle index ae95c4ff..0df1d589 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -25,6 +25,11 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' android { + // Conditional for compatibility with AGP <4.2. + if (project.android.hasProperty("namespace")) { + namespace 'com.example.video_compress' + } + compileSdkVersion 31 sourceSets { From 18e46a600dd502d80e4474b7fcae513a7233373e Mon Sep 17 00:00:00 2001 From: Cristian Zazo Date: Mon, 28 Aug 2023 10:24:00 +0200 Subject: [PATCH 2/3] Update build.gradle --- android/build.gradle | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 0df1d589..78dab533 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -2,14 +2,14 @@ group 'com.example.video_compress' version '1.0-SNAPSHOT' buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.9.10' repositories { google() mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:7.0.0' + classpath 'com.android.tools.build:gradle:8.1.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } @@ -30,13 +30,18 @@ android { namespace 'com.example.video_compress' } - compileSdkVersion 31 + compileSdk 34 + + compileOptions { + sourceCompatibility 1.8 + targetCompatibility 1.8 + } sourceSets { main.java.srcDirs += 'src/main/kotlin' } defaultConfig { - minSdkVersion 18 + minSdkVersion 19 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } lintOptions { @@ -45,6 +50,6 @@ android { } dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation 'com.otaliastudios:transcoder:0.9.1' } From 55a32a17c882df6192d7dee4e73d4a37f97df395 Mon Sep 17 00:00:00 2001 From: Cristian Zazo Date: Mon, 28 Aug 2023 10:28:08 +0200 Subject: [PATCH 3/3] Update build.gradle --- android/build.gradle | 3 +++ 1 file changed, 3 insertions(+) diff --git a/android/build.gradle b/android/build.gradle index 78dab533..8f154e16 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -36,6 +36,9 @@ android { sourceCompatibility 1.8 targetCompatibility 1.8 } + kotlinOptions { + jvmTarget = "1.8" + } sourceSets { main.java.srcDirs += 'src/main/kotlin'