Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flutter 3.24.0 upgrade #1307

Open
wants to merge 2 commits into
base: minor
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
140 changes: 112 additions & 28 deletions just_audio/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,58 +1,142 @@
//group 'com.ryanheise.just_audio'
//version '1.0'
//def args = ["-Xlint:deprecation","-Xlint:unchecked"]
//
//buildscript {
// ext {
// kotlin_version = '2.0.0'
// }
// repositories {
// ext.kotlin_version = '2.0.0'
// google()
// mavenCentral()
// }
//
// dependencies {
// classpath 'com.android.tools.build:gradle:7.4.2'
// classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// }
//}
//
//rootProject.allprojects {
// repositories {
// google()
// mavenCentral()
// }
//}
//
//project.getTasks().withType(JavaCompile) {
// options.compilerArgs.addAll(args)
//}
//
//apply plugin: 'com.android.library'
//apply plugin: 'org.jetbrains.kotlin.android'
//apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
//
//
//flutter {
// source '../..'
//}
//
//android {
// // Conditional for compatibility with AGP <4.2.
//// if (project.android.hasProperty("namespace")) {
// namespace 'com.ryanheise.just_audio'
// compileSdkVersion 33
//// }
//
// defaultConfig {
// minSdk 21
// testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
// }
//
// lintOptions {
// disable 'InvalidPackage'
// }
//
// compileOptions {
// sourceCompatibility JavaVersion.VERSION_17
// targetCompatibility JavaVersion.VERSION_17
// }
//
//// // Configure the JVM toolchain for JDK 21
// java {
// toolchain {
// languageVersion.set(JavaLanguageVersion.of(17))
// }
// }
//
// dependencies {
// def exoplayer_version = "2.19.1"
// implementation "com.google.android.exoplayer:exoplayer-core:$exoplayer_version"
// implementation "com.google.android.exoplayer:exoplayer-dash:$exoplayer_version"
// implementation "com.google.android.exoplayer:exoplayer-hls:$exoplayer_version"
// implementation "com.google.android.exoplayer:exoplayer-smoothstreaming:$exoplayer_version"
// }
// kotlinOptions {
// jvmTarget = '17'
// }
//}
//
//dependencies {
// implementation 'androidx.core:core-ktx:1.13.1'
// implementation 'androidx.media3:media3-exoplayer:1.4.0'
//}
//



group 'com.ryanheise.just_audio'
version '1.0'
def args = ["-Xlint:deprecation","-Xlint:unchecked"]

buildscript {
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.3.0'
}
}

rootProject.allprojects {
repositories {
google()
mavenCentral()
}
}

project.getTasks().withType(JavaCompile) {
options.compilerArgs.addAll(args)
}

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
// Conditional for compatibility with AGP <4.2.
if (project.android.hasProperty("namespace")) {
namespace 'com.ryanheise.just_audio'
namespace 'com.ryanheise.just_audio'
compileSdkVersion 34

compileOptions {
sourceCompatibility JavaVersion.VERSION_21
targetCompatibility JavaVersion.VERSION_21
}
compileSdk 34

defaultConfig {
minSdk 16
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
kotlinOptions {
jvmTarget = "21"
}

lintOptions {
disable 'InvalidPackage'
defaultConfig {
minSdkVersion 21
}
// Configure the JVM toolchain for JDK 21
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}

compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}

dependencies {
def exoplayer_version = "2.18.7"
def exoplayer_version = "2.19.1"
implementation "com.google.android.exoplayer:exoplayer-core:$exoplayer_version"
implementation "com.google.android.exoplayer:exoplayer-dash:$exoplayer_version"
implementation "com.google.android.exoplayer:exoplayer-hls:$exoplayer_version"
implementation "com.google.android.exoplayer:exoplayer-smoothstreaming:$exoplayer_version"
}
}

dependencies {
implementation 'androidx.core:core-ktx:1.13.1'
implementation 'androidx.media3:media3-exoplayer:1.4.0'
}
1 change: 0 additions & 1 deletion just_audio/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
import com.google.android.exoplayer2.upstream.DefaultHttpDataSource;
import com.google.android.exoplayer2.util.MimeTypes;
import com.google.android.exoplayer2.util.Util;
import io.flutter.Log;
import android.util.Log;
import io.flutter.plugin.common.BinaryMessenger;
import io.flutter.plugin.common.EventChannel;
import io.flutter.plugin.common.EventChannel.EventSink;
Expand Down
113 changes: 96 additions & 17 deletions just_audio/example/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,73 @@
// def localProperties = new Properties()
// def localPropertiesFile = rootProject.file('local.properties')
// if (localPropertiesFile.exists()) {
// localPropertiesFile.withReader('UTF-8') { reader ->
// localProperties.load(reader)
// }
// }

// def flutterRoot = localProperties.getProperty('flutter.sdk')
// if (flutterRoot == null) {
// throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
// }

// def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
// if (flutterVersionCode == null) {
// flutterVersionCode = '1'
// }

// def flutterVersionName = localProperties.getProperty('flutter.versionName')
// if (flutterVersionName == null) {
// flutterVersionName = '1.0'
// }

// apply plugin: 'com.android.application'
// apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

// android {
// namespace 'com.ryanheise.just_audio_example'
// compileSdk 34

// lintOptions {
// disable 'InvalidPackage'
// }

// defaultConfig {
// // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
// applicationId "com.ryanheise.just_audio_example"
// minSdk flutter.minSdkVersion
// targetSdk 34
// versionCode flutterVersionCode.toInteger()
// versionName flutterVersionName
// testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
// }

// buildTypes {
// release {
// // TODO: Add your own signing config for the release build.
// // Signing with the debug keys for now, so `flutter run --release` works.
// signingConfig signingConfigs.debug
// }
// }
// }

// flutter {
// source '../..'
// }

// dependencies {
// testImplementation 'junit:junit:4.12'
// androidTestImplementation 'androidx.test:runner:1.1.1'
// androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
// }


plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
Expand All @@ -6,10 +76,6 @@ if (localPropertiesFile.exists()) {
}
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
Expand All @@ -21,25 +87,29 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
//apply plugin: 'com.android.application'
//apply plugin: 'kotlin-android'
//apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
namespace 'com.ryanheise.just_audio_example'
compileSdk 34
compileSdkVersion flutter.compileSdkVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_21
targetCompatibility JavaVersion.VERSION_21
}

lintOptions {
disable 'InvalidPackage'
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.ryanheise.just_audio_example"
minSdk flutter.minSdkVersion
targetSdk 34
minSdkVersion 21
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
Expand All @@ -49,14 +119,23 @@ android {
signingConfig signingConfigs.debug
}
}
kotlinOptions {
jvmTarget = "21"
}
// Configure the JVM toolchain for JDK 21
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}
}

flutter {
source '../..'
}

dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
}
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test:runner:1.6.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
}
30 changes: 13 additions & 17 deletions just_audio/example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
buildscript {
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.3.0'
}
}
//buildscript {
// ext.kotlin_version = '2.0.0'
// repositories {
// google()
// mavenCentral()
// }
//
// dependencies {
// classpath 'com.android.tools.build:gradle:8.5.1'
// classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// }
//}

allprojects {
repositories {
Expand All @@ -28,10 +30,4 @@ tasks.register("clean", Delete) {
delete rootProject.buildDir
}

gradle.projectsEvaluated {
project(":just_audio") {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Werror"
}
}
}

Loading