mirror of
https://github.com/YTVanced/VancedMicroG
synced 2024-11-24 04:05:13 +00:00
Use flavors for mapbox vs vtm
This commit is contained in:
parent
895c74d095
commit
8eff51cfb6
63 changed files with 40 additions and 28 deletions
|
@ -16,17 +16,12 @@
|
|||
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
def useMapbox() {
|
||||
Properties properties = new Properties()
|
||||
properties.load(project.rootProject.file('local.properties').newDataInputStream())
|
||||
return properties.getProperty("mapbox.enabled", "false") == "true"
|
||||
configurations {
|
||||
mapboxImplementation
|
||||
vtmImplementation
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "androidx.multidex:multidex:$multidexVersion"
|
||||
implementation "androidx.appcompat:appcompat:$appcompatVersion"
|
||||
implementation "androidx.mediarouter:mediarouter:$mediarouterVersion"
|
||||
implementation "androidx.preference:preference:$preferenceVersion"
|
||||
implementation "com.squareup.wire:wire-runtime:1.6.1"
|
||||
implementation "de.hdodenhof:circleimageview:1.3.0"
|
||||
implementation "org.conscrypt:conscrypt-android:2.1.0"
|
||||
|
@ -42,18 +37,21 @@ dependencies {
|
|||
|
||||
implementation project(':play-services-base-core')
|
||||
implementation project(':play-services-location-core')
|
||||
implementation project(':microg-ui-tools')
|
||||
implementation project(':play-services-core:microg-ui-tools') // deprecated
|
||||
implementation project(':play-services-api')
|
||||
implementation project(':play-services-cast-api')
|
||||
implementation project(':play-services-wearable')
|
||||
implementation "org.microg:wearable:$wearableVersion"
|
||||
implementation "org.microg.gms:remote-droid-guard:$remoteDroidGuardVersion"
|
||||
|
||||
if (useMapbox()) {
|
||||
implementation project(':play-services-maps-core-mapbox')
|
||||
} else {
|
||||
implementation project(':play-services-maps-core-vtm')
|
||||
}
|
||||
mapboxImplementation project(':play-services-maps-core-mapbox')
|
||||
vtmImplementation project(':play-services-maps-core-vtm')
|
||||
|
||||
// AndroidX UI
|
||||
implementation "androidx.multidex:multidex:$multidexVersion"
|
||||
implementation "androidx.appcompat:appcompat:$appcompatVersion"
|
||||
implementation "androidx.mediarouter:mediarouter:$mediarouterVersion"
|
||||
implementation "androidx.preference:preference:$preferenceVersion"
|
||||
|
||||
// Navigation
|
||||
implementation "androidx.navigation:navigation-fragment:$navigationVersion"
|
||||
|
@ -67,13 +65,13 @@ android {
|
|||
buildToolsVersion "$androidBuildVersionTools"
|
||||
|
||||
defaultConfig {
|
||||
versionName version + (useMapbox() ? "" : "-vtm")
|
||||
versionName version
|
||||
versionCode appVersionCode
|
||||
|
||||
minSdkVersion androidMinSdk
|
||||
targetSdkVersion androidTargetSdk
|
||||
|
||||
buildConfigField "boolean", "USE_MAPBOX", "${useMapbox()}"
|
||||
// buildConfigField "boolean", "USE_MAPBOX", "${useMapbox()}"
|
||||
|
||||
multiDexEnabled true
|
||||
|
||||
|
@ -103,6 +101,17 @@ android {
|
|||
}
|
||||
}
|
||||
|
||||
flavorDimensions 'maps'
|
||||
productFlavors {
|
||||
mapbox {
|
||||
dimension 'maps'
|
||||
}
|
||||
vtm {
|
||||
dimension 'maps'
|
||||
versionNameSuffix '-vtm'
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
|
|
|
@ -29,7 +29,7 @@ public class AboutFragment extends AbstractAboutFragment {
|
|||
|
||||
@Override
|
||||
protected void collectLibraries(List<AbstractAboutFragment.Library> libraries) {
|
||||
if (BuildConfig.USE_MAPBOX) {
|
||||
if (BuildConfig.FLAVOR.contains("mapbox")) {
|
||||
libraries.add(new AbstractAboutFragment.Library("com.mapbox.mapboxsdk", "Mapbox Maps SDK for Android", "Three-Clause BSD, Mapbox"));
|
||||
} else {
|
||||
libraries.add(new AbstractAboutFragment.Library("org.oscim.android", "V™", "GNU LGPLv3, Hannes Janetzek and devemux86"));
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
apply plugin: "com.android.library"
|
||||
|
||||
dependencies {
|
||||
implementation project(":microg-ui-tools")
|
||||
implementation project(":play-services-api")
|
||||
|
||||
implementation "org.microg:vtm-android:0.9.1-mod"
|
||||
|
@ -28,7 +27,9 @@ dependencies {
|
|||
implementation "org.microg:vtm-android:0.9.1-mod:natives-x86_64"
|
||||
implementation "org.microg:vtm-extras:0.9.1-mod"
|
||||
implementation "org.microg:vtm-jts:0.9.1-mod"
|
||||
implementation project(":vtm-microg-theme")
|
||||
implementation project(":play-services-maps-core-vtm:vtm-microg-theme")
|
||||
|
||||
implementation "androidx.appcompat:appcompat:$appcompatVersion"
|
||||
}
|
||||
|
||||
def execResult(...args) {
|
||||
|
|
|
@ -21,9 +21,10 @@ import android.content.Context;
|
|||
import android.content.res.Resources;
|
||||
import android.os.Parcel;
|
||||
import android.os.RemoteException;
|
||||
import android.support.annotation.Keep;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.Keep;
|
||||
|
||||
import com.google.android.gms.dynamic.IObjectWrapper;
|
||||
import com.google.android.gms.dynamic.ObjectWrapper;
|
||||
import com.google.android.gms.maps.GoogleMapOptions;
|
||||
|
|
|
@ -27,10 +27,11 @@ import android.os.Handler;
|
|||
import android.os.Looper;
|
||||
import android.os.Parcel;
|
||||
import android.os.RemoteException;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.google.android.gms.dynamic.IObjectWrapper;
|
||||
import com.google.android.gms.dynamic.ObjectWrapper;
|
||||
import com.google.android.gms.maps.GoogleMapOptions;
|
||||
|
|
|
@ -21,7 +21,8 @@ import android.graphics.Bitmap;
|
|||
import android.graphics.Canvas;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
public class ResourceBitmapDescriptor extends AbstractBitmapDescriptor {
|
||||
private int resourceId;
|
||||
|
|
Before Width: | Height: | Size: 867 B After Width: | Height: | Size: 867 B |
Before Width: | Height: | Size: 834 B After Width: | Height: | Size: 834 B |
Before Width: | Height: | Size: 854 B After Width: | Height: | Size: 854 B |
|
@ -13,14 +13,13 @@ include ':play-services-base'
|
|||
include ':play-services-tasks'
|
||||
include ':play-services-wearable'
|
||||
|
||||
include ':play-services-maps-core-mapbox'
|
||||
include ':play-services-maps-core-vtm'
|
||||
include ':play-services-base-core'
|
||||
include ':play-services-location-core'
|
||||
include ':play-services-maps-core-mapbox'
|
||||
include ':play-services-maps-core-vtm'
|
||||
include ':play-services-maps-core-vtm:vtm-microg-theme'
|
||||
|
||||
include ':play-services-core'
|
||||
include ':play-services-core:microg-ui-tools'
|
||||
|
||||
include ':microg-ui-tools'
|
||||
|
||||
include ':vtm-microg-theme'
|
||||
|
||||
include ':remote-droid-guard-lib'
|
||||
|
|
Loading…
Reference in a new issue