From fdb88fc47a7d3cebcb3f0b886fc0825ca36b78e8 Mon Sep 17 00:00:00 2001 From: Raymond Yang Date: Mon, 22 May 2023 13:36:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0Gradle=20Plugin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 18 +++++++++--------- build.gradle | 4 ++-- gradle.properties | 5 ++++- gradle/wrapper/gradle-wrapper.properties | 2 +- gstreamer_player/build.gradle | 16 ++++++++++++++-- 5 files changed, 30 insertions(+), 15 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index fe89c25..0ada1b6 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -6,6 +6,7 @@ plugins { } android { + namespace 'com.ray650128.gstreamer_demo_app' ndkVersion "21.3.6528147" compileSdk 33 @@ -26,29 +27,28 @@ android { } } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 } kotlinOptions { - jvmTarget = '1.8' + jvmTarget = '17' } lint { abortOnError false checkReleaseBuilds false } viewBinding.enabled = true - namespace 'com.ray650128.gstreamer_demo_app' } dependencies { - implementation 'androidx.core:core-ktx:1.9.0' + implementation 'androidx.core:core-ktx:1.10.1' implementation 'androidx.appcompat:appcompat:1.6.1' - implementation 'com.google.android.material:material:1.8.0' + implementation 'com.google.android.material:material:1.9.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation 'androidx.gridlayout:gridlayout:1.0.0' - implementation 'androidx.core:core-ktx:1.9.0' + implementation 'androidx.core:core-ktx:1.10.1' testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.5' androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' @@ -56,6 +56,6 @@ dependencies { implementation project(path: ':gstreamer_player') // Android Jetpack lib - implementation("androidx.fragment:fragment-ktx:1.5.5") - implementation("androidx.activity:activity-ktx:1.6.1") + implementation("androidx.fragment:fragment-ktx:1.5.7") + implementation("androidx.activity:activity-ktx:1.7.1") } diff --git a/build.gradle b/build.gradle index 11940fd..5e878ca 100644 --- a/build.gradle +++ b/build.gradle @@ -7,8 +7,8 @@ buildscript { } plugins { - id 'com.android.application' version '7.4.2' apply false - id 'com.android.library' version '7.4.2' apply false + id 'com.android.application' version '8.0.1' apply false + id 'com.android.library' version '8.0.1' apply false id 'org.jetbrains.kotlin.android' version '1.8.10' apply false id 'org.jetbrains.kotlin.plugin.parcelize' version '1.7.0' apply false } diff --git a/gradle.properties b/gradle.properties index 98bed16..8145fa7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,4 +18,7 @@ android.useAndroidX=true # Automatically convert third-party libraries to use AndroidX android.enableJetifier=true # Kotlin code style for this project: "official" or "obsolete": -kotlin.code.style=official \ No newline at end of file +kotlin.code.style=official +android.defaults.buildfeatures.buildconfig=true +android.nonTransitiveRClass=false +android.nonFinalResIds=false \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a7c4fc6..4fd61d3 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Thu Mar 24 14:41:01 CST 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/gstreamer_player/build.gradle b/gstreamer_player/build.gradle index f896630..ebf7229 100644 --- a/gstreamer_player/build.gradle +++ b/gstreamer_player/build.gradle @@ -2,9 +2,10 @@ apply plugin: 'com.android.library' apply plugin: 'org.jetbrains.kotlin.android' android { + namespace 'com.hisharp.gstreamer_player' ndkVersion "21.3.6528147" - compileSdkVersion 33 + compileSdk 33 defaultConfig { minSdkVersion 15 @@ -58,6 +59,17 @@ android { path 'jni/Android.mk' } } + buildFeatures { + renderScript true + aidl true + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 + } + kotlinOptions { + jvmTarget = '17' + } } afterEvaluate { @@ -69,7 +81,7 @@ afterEvaluate { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'androidx.core:core-ktx:1.9.0' + implementation 'androidx.core:core-ktx:1.10.1' testImplementation 'junit:junit:4.13.2' //implementation 'androidx.appcompat:appcompat:1.6.0' }