Skip to content

Commit 3c5e339

Browse files
authored
Bump Spotify Android SDK version and clean up android configs (#162)
* Update remote submodules * Update build.gradle
1 parent dfb9376 commit 3c5e339

5 files changed

Lines changed: 23 additions & 113 deletions

File tree

android/build.gradle

Lines changed: 14 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,6 @@
1-
// android/build.gradle
2-
3-
// based on:
4-
//
5-
// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle
6-
// original location:
7-
// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle
8-
//
9-
// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle
10-
// original location:
11-
// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle
12-
13-
def DEFAULT_COMPILE_SDK_VERSION = 28
14-
def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3'
1+
def DEFAULT_COMPILE_SDK_VERSION = 29
152
def DEFAULT_MIN_SDK_VERSION = 16
16-
def DEFAULT_TARGET_SDK_VERSION = 28
3+
def DEFAULT_TARGET_SDK_VERSION = 29
174

185
def safeExtGet(prop, fallback) {
196
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
@@ -30,6 +17,7 @@ buildscript {
3017
if (project == rootProject) {
3118
repositories {
3219
google()
20+
mavenCentral()
3321
jcenter()
3422
}
3523
dependencies {
@@ -43,34 +31,35 @@ apply plugin: 'maven'
4331

4432
android {
4533
compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION)
46-
buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION)
4734
defaultConfig {
4835
minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION)
4936
targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION)
5037
versionCode 1
5138
versionName "1.0"
5239
}
40+
41+
buildTypes {
42+
release {
43+
minifyEnabled false
44+
}
45+
}
5346
lintOptions {
54-
abortOnError false
47+
disable 'GradleCompatible'
5548
}
5649
compileOptions {
57-
sourceCompatibility = 1.8
58-
targetCompatibility = 1.8
50+
sourceCompatibility JavaVersion.VERSION_1_8
51+
targetCompatibility JavaVersion.VERSION_1_8
5952
}
6053
}
6154

6255
repositories {
63-
// ref: https://www.baeldung.com/maven-local-repository
6456
mavenLocal()
6557
maven {
6658
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
6759
url "$rootDir/../node_modules/react-native/android"
6860
}
69-
maven {
70-
// Android JSC is installed from npm
71-
url "$rootDir/../node_modules/jsc-android/dist"
72-
}
7361
google()
62+
mavenCentral()
7463
jcenter()
7564
}
7665

@@ -83,7 +72,7 @@ dependencies {
8372
implementation "com.google.code.gson:gson:2.8.5" // needed by spotify-app-remote
8473
implementation project(path: ':react-native-events') // From node_module
8574
//noinspection GradleDynamicVersion
86-
implementation 'com.facebook.react:react-native:+'
75+
implementation "com.facebook.react:react-native:+" // From node_modules
8776
}
8877

8978
def configureReactNativePom(def pom) {
@@ -158,54 +147,3 @@ afterEvaluate { project ->
158147
}
159148
}
160149
}
161-
162-
163-
164-
//buildscript {
165-
// repositories {
166-
// google()
167-
// jcenter()
168-
// mavenCentral()
169-
// }
170-
//
171-
// dependencies {
172-
// classpath 'com.android.tools.build:gradle:3.6.1'
173-
// }
174-
//}
175-
//
176-
//apply plugin: 'com.android.library'
177-
//
178-
//android {
179-
// compileSdkVersion 28
180-
// buildToolsVersion "28.0.3"
181-
//
182-
// defaultConfig {
183-
// minSdkVersion 16
184-
// targetSdkVersion 28
185-
// versionCode 1
186-
// versionName "1.0"
187-
// }
188-
// lintOptions {
189-
// abortOnError false
190-
// }
191-
// compileOptions {
192-
// sourceCompatibility = 1.8
193-
// targetCompatibility = 1.8
194-
// }
195-
//}
196-
//
197-
//repositories {
198-
// google()
199-
// maven {
200-
// // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
201-
// url "$rootDir/../node_modules/react-native/android"
202-
// }
203-
// jcenter()
204-
//}
205-
//
206-
//dependencies {
207-
// implementation project(':spotify-app-remote-release-0.7.0')
208-
// implementation 'com.spotify.android:auth:1.2.3'
209-
// implementation project(path: ':react-native-events')
210-
// implementation 'com.facebook.react:react-native:+'
211-
//}

android/external/SpotifySDK

Submodule SpotifySDK updated 155 files

android/gradle.properties

Lines changed: 0 additions & 28 deletions
This file was deleted.

ios/external/SpotifySDK

Submodule SpotifySDK updated 108 files

react-native.config.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
module.exports = {
2-
dependency: {
3-
platforms: {
4-
android: {
5-
"packageImportPath":"import com.reactlibrary.RNSpotifyRemotePackage;"
6-
},
2+
dependency: {
3+
platforms: {
4+
android: {
5+
packageImportPath: "import com.reactlibrary.RNSpotifyRemotePackage;",
76
},
8-
}
9-
};
7+
},
8+
},
9+
};

0 commit comments

Comments
 (0)