If you are annoyed that "Sources for Android 26" are not yet available via SDK manager, this might be for you:
- Collect source files
mkdir android-sdk-source-build
cd android-sdk-source-build
mkdir -p frameworks/base| #!/usr/bin/env bash | |
| set -euo pipefail | |
| ########## | |
| # Config # | |
| ########## | |
| readonly GIT_BRANCH='android-8.0.0_r4' | |
| readonly API_LEVEL='26' |
If you are annoyed that "Sources for Android 26" are not yet available via SDK manager, this might be for you:
mkdir android-sdk-source-build
cd android-sdk-source-build
mkdir -p frameworks/base| import com.squareup.moshi.JsonAdapter | |
| import com.squareup.moshi.Moshi | |
| import com.squareup.moshi.Types | |
| import java.lang.reflect.Type | |
| // val adapter = moshi.listAdapter<MyModel>() | |
| // val adapter = moshi.mapAdapter<String, List<MyModel>>(valueType = listType<MyModel>()) | |
| inline fun <reified E> Moshi.listAdapter(elementType: Type = E::class.java): JsonAdapter<List<E>> { | |
| return adapter(listType<E>(elementType)) |