From 3a70bca20c1c6b5bd1eb6b17160acefcaccd99ea Mon Sep 17 00:00:00 2001 From: Mitch Ross Date: Sat, 8 Feb 2020 16:01:07 -0500 Subject: [PATCH 1/2] Fix for broken Android Studio Builds. Migrated to Androix X. Updated Gradle. Change Target to 29. --- android/build.gradle | 6 +++--- example/.flutter-plugins-dependencies | 1 + example/android/app/build.gradle | 10 +++++----- example/android/build.gradle | 14 +++++++++++++- example/android/gradle.properties | 3 +++ .../gradle/wrapper/gradle-wrapper.properties | 4 ++-- 6 files changed, 27 insertions(+), 11 deletions(-) create mode 100644 example/.flutter-plugins-dependencies diff --git a/android/build.gradle b/android/build.gradle index c4b750f0..4705daed 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -8,7 +8,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.3.1' + classpath 'com.android.tools.build:gradle:3.5.3' } } @@ -36,7 +36,7 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'de.mrmaffen:libvlc-android:2.1.12@aar' - implementation 'androidx.appcompat:appcompat:1.0.2' + implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'androidx.annotation:annotation:1.0.2' + implementation 'androidx.annotation:annotation:1.1.0' } \ No newline at end of file diff --git a/example/.flutter-plugins-dependencies b/example/.flutter-plugins-dependencies new file mode 100644 index 00000000..936fadeb --- /dev/null +++ b/example/.flutter-plugins-dependencies @@ -0,0 +1 @@ +{"_info":"// This is a generated file; do not edit or check into version control.","dependencyGraph":[{"name":"flutter_vlc_player","dependencies":[]}]} \ No newline at end of file diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 8b0e5830..14310acb 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -25,7 +25,7 @@ apply plugin: 'com.android.application' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 28 + compileSdkVersion 29 lintOptions { disable 'InvalidPackage' @@ -34,10 +34,10 @@ android { defaultConfig { applicationId "software.solid.fluttervlcplayerexample" minSdkVersion 16 - targetSdkVersion 27 + targetSdkVersion 29 versionCode flutterVersionCode.toInteger() versionName flutterVersionName - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { @@ -54,6 +54,6 @@ flutter { dependencies { testImplementation 'junit:junit:4.12' - androidTestImplementation 'com.android.support.test:runner:1.0.2' - androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' + androidTestImplementation 'androidx.test.ext:junit:1.1.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' } diff --git a/example/android/build.gradle b/example/android/build.gradle index bb8a3038..e35e365c 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -5,7 +5,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.2.1' + classpath 'com.android.tools.build:gradle:3.5.3' } } @@ -24,6 +24,18 @@ subprojects { project.evaluationDependsOn(':app') } +//https://github.com/flutter/flutter/issues/27254 +subprojects { + project.configurations.all { + resolutionStrategy.eachDependency { details -> + if (details.requested.group == 'androidx.core' && + !details.requested.name.contains('androidx')) { + details.useVersion "1.0.1" + } + } + } +} + task clean(type: Delete) { delete rootProject.buildDir } diff --git a/example/android/gradle.properties b/example/android/gradle.properties index 8bd86f68..38c8d454 100644 --- a/example/android/gradle.properties +++ b/example/android/gradle.properties @@ -1 +1,4 @@ org.gradle.jvmargs=-Xmx1536M +android.enableR8=true +android.useAndroidX=true +android.enableJetifier=true diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties index 2819f022..f8a3a494 100644 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/example/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Fri Jun 23 08:50:38 CEST 2017 +#Sat Feb 08 15:55:55 EST 2020 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip From d2951cc3f7d8f159e14aaa3d545861a2ad97370c Mon Sep 17 00:00:00 2001 From: Mitch Ross Date: Sun, 9 Feb 2020 13:48:49 -0500 Subject: [PATCH 2/2] Delete project file committed by accident --- example/.flutter-plugins-dependencies | 1 - 1 file changed, 1 deletion(-) delete mode 100644 example/.flutter-plugins-dependencies diff --git a/example/.flutter-plugins-dependencies b/example/.flutter-plugins-dependencies deleted file mode 100644 index 936fadeb..00000000 --- a/example/.flutter-plugins-dependencies +++ /dev/null @@ -1 +0,0 @@ -{"_info":"// This is a generated file; do not edit or check into version control.","dependencyGraph":[{"name":"flutter_vlc_player","dependencies":[]}]} \ No newline at end of file