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

chore: update libraries #219

Merged
merged 1 commit into from
Oct 2, 2024
Merged
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
21 changes: 18 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:4.0.2'
classpath 'com.android.tools.build:gradle:8.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand All @@ -27,15 +27,30 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
compileSdk 34
if (project.android.hasProperty("namespace")) {
namespace 'de.minimalme.spotify_sdk'
}

compileSdk 35

compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}

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

defaultConfig {
minSdkVersion 21
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

lintOptions {
disable 'InvalidPackage'
}
Expand All @@ -46,7 +61,7 @@ dependencies {
// -- spotify
implementation "com.spotify.android:auth:2.1.0"
implementation project(':spotify-app-remote')
implementation 'com.google.code.gson:gson:2.10'
implementation 'com.google.code.gson:gson:2.10.1'
// -- events
implementation "com.github.stuhlmeier:kotlin-events:v2.0"
}
3 changes: 1 addition & 2 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.minimalme.spotify_sdk">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application>
<activity
android:name="com.spotify.sdk.android.authentication.LoginActivity"
Expand Down
54 changes: 16 additions & 38 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,42 +1,21 @@
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'
plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}

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

android {
namespace 'de.minimalme.spotify_sdk_example'
compileSdk 34
ndkVersion flutter.ndkVersion
compileSdk 35
ndkVersion = "27.0.12077973"

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = '1.8'
jvmTarget = JavaVersion.VERSION_1_8
}

sourceSets {
Expand All @@ -45,11 +24,11 @@ android {

defaultConfig {
manifestPlaceholders = [redirectSchemeName: "spotify-sdk", redirectHostName: "auth"]
applicationId "de.minimalme.spotify_sdk_example"
minSdkVersion 21
targetSdkVersion 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
applicationId = "de.minimalme.spotify_sdk_example"
minSdk = 21
targetSdk = 35
versionCode = flutter.versionCode
versionName = flutter.versionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

Expand All @@ -70,8 +49,7 @@ flutter {
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test:runner:1.5.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
androidTestImplementation 'androidx.test:runner:1.6.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
}
16 changes: 2 additions & 14 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
buildscript {
ext.kotlin_version = '1.8.22'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
google()
Expand All @@ -19,6 +6,7 @@ allprojects {
}

rootProject.buildDir = '../build'

subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
Expand All @@ -28,4 +16,4 @@ subprojects {

tasks.register("clean", Delete) {
delete rootProject.buildDir
}
}
5 changes: 3 additions & 2 deletions example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#Sun Nov 19 15:44:37 CET 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
21 changes: 13 additions & 8 deletions example/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,22 @@ pluginManagement {
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}
settings.ext.flutterSdkPath = flutterSdkPath()
}()

includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")

plugins {
id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}

include ":app"
include ':spotify-app-remote'
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version '8.1.0' apply false
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
}

apply from: "${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle/app_plugin_loader.gradle"
include ":app"
include ":spotify-app-remote"
8 changes: 4 additions & 4 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ description: Demonstrates how to use the spotify_sdk plugin.
publish_to: 'none'

environment:
sdk: ">=3.1.1 <4.0.0"
sdk: ^3.5.0

dependencies:
flutter:
sdk: flutter
logger: ^2.0.2+1
logger: ^2.4.0
flutter_dotenv: ^5.1.0
cupertino_icons: ^1.0.6
cupertino_icons: ^1.0.8
spotify_sdk:
# When depending on this package from a real application you should use:
# spotify_sdk: ^x.y.z
Expand All @@ -22,7 +22,7 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^4.0.0
flutter_lints: ^5.0.0

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
Expand Down
21 changes: 10 additions & 11 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,27 @@ homepage: https://github.com/brim-borium/spotify_sdk
issue_tracker: https://github.com/brim-borium/spotify_sdk/issues

environment:
sdk: '>=3.1.1 <4.0.0'
flutter: ">=1.17.0"
sdk: ^3.5.0

dependencies:
flutter:
sdk: flutter
flutter_web_plugins:
sdk: flutter
logger: ^2.0.2+1
dio: ^5.3.3
json_annotation: ^4.8.1
logger: ^2.4.0
dio: ^5.7.0
json_annotation: ^4.9.0
js: ">=0.6.7 <0.8.0"
crypto: ^3.0.3
synchronized: ^3.1.0
http: ^1.1.0
crypto: ^3.0.5
synchronized: ^3.3.0+3
http: ^1.2.2

dev_dependencies:
flutter_test:
sdk: flutter
build_runner: ^2.4.6
json_serializable: ^6.7.1
flutter_lints: ^3.0.1
build_runner: ^2.4.13
json_serializable: ^6.8.0
flutter_lints: ^5.0.0


# For information on the generic Dart part of this file, see the
Expand Down
Loading