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

retrieve spotify-auth from mavenCentral #157

Merged
merged 1 commit into from
Jan 31, 2022
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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## next

* Android:
* `spotify-auth` SDK is now retrieved via Maven Central instead of being sourced from an AAR file

## 2.2.0
* iOS and Android
* adds SkipToIndex and getCapabilities
Expand Down
15 changes: 5 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,31 +30,26 @@ This package is using both the spotify-app-remote sdk and spotify-auth library.
From the [Spotify Android SDK Quick Start](https://developer.spotify.com/documentation/android/quick-start/). You need two things:

1. Register your app in the [spotify developer portal](https://developer.spotify.com/dashboard/). You also need to create a sha-1 fingerprint and add this and your package name to the app settings on the dashboard as well as a redirect url.
2. download the current [Spotify Android SDK](https://github.com/spotify/android-sdk/releases). Here you need the spotify-app-remote-*.aar and spotify-auth-*.aar.
2. download the current [Spotify Android SDK](https://github.com/spotify/android-sdk/releases). Here you need the spotify-app-remote-*.aar.

After you are all setup you need to add the *.aar files to your Android Project as Modules. See the [Spotify Android SDK Quick Start](https://developer.spotify.com/documentation/android/quick-start/) for detailed information.
After you are all setup you need to add the SDKs *.aar file to your Android Project as Module. See the [Spotify Android SDK Quick Start](https://developer.spotify.com/documentation/android/quick-start/) for detailed information.

##### Installation instructions for Android Studio 4.2+

Since Android Studio 4.2 you need to manually perform these steps in order to add .jar/.aar files:

1. Open the android folder of your flutter project as an Android Studio project
2. In the android root folder create two folders: spotify-app-remote and spotify-auth and place the corresponding aar files and create empty build.gradle files, like on the screenshot below:
2. In the android root folder create a single folder for `spotify-app-remote`, place the corresponding aar file and create an empty build.gradle file, like on the screenshot below:
![image](https://user-images.githubusercontent.com/42183561/125422846-24e03bf0-ec7f-409f-b382-0ef2d0213d08.png)

3. Content of the `spotify-app-remote/build.gradle` file:
```
configurations.maybeCreate("default")
artifacts.add("default", file('spotify-app-remote-release-x.x.x.aar'))
```
4. Content of the `spotify-auth/build.gradle` file:
4. In the android root folder find `settings.gradle` file, open it and add the following line at the top of the file:
```
configurations.maybeCreate("default")
artifacts.add("default", file('spotify-auth-release-x.x.x.aar'))
```
5. In the android root folder find `settings.gradle` file, open it and add the following line at the top of the file:
```
include ':spotify-auth', ':spotify-app-remote'
include ':spotify-app-remote'
```

### iOS
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ android {
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
// -- spotify
implementation project(':spotify-auth')
implementation "com.spotify.android:auth:1.2.6"
implementation project(':spotify-app-remote')
implementation 'com.google.code.gson:gson:2.8.6'
// -- events
Expand Down
2 changes: 1 addition & 1 deletion android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
rootProject.name = 'spotify_sdk'
include ':spotify-auth', ':spotify-app-remote'
include ':spotify-app-remote'
2 changes: 1 addition & 1 deletion example/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include ':app', ':spotify-auth', ':spotify-app-remote'
include ':app', ':spotify-app-remote'

def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()

Expand Down
2 changes: 0 additions & 2 deletions example/android/spotify-auth/build.gradle

This file was deleted.

Binary file not shown.