Add gradle build for GmsCore

This commit is contained in:
mar-v-in 2015-01-03 15:27:50 +01:00
parent de24dcc33c
commit 52138a69e5
5 changed files with 138 additions and 84 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@
gen
bin
build
user.gradle

View File

@ -33,14 +33,12 @@
<application
android:theme="@style/AppTheme"
android:label="@string/gms_app_name">
<uses-library
android:name="com.android.location.provider"
android:required="false" />
<uses-library
android:name="com.google.android.maps"
android:required="false" />
<meta-data android:name="fake-signature" android:value="@string/fake_signature" />
<meta-data android:name="fake-signature"
android:value="@string/fake_signature" />
<!-- Jelly Bean / KitKat -->
<service
@ -106,10 +104,14 @@
<intent-filter>
<action android:name="com.google.android.location.internal.GMS_NLP" />
</intent-filter>
<meta-data android:name="minProtocolVersion" android:value="1" />
<meta-data android:name="maxProtocolVersion" android:value="1" />
<meta-data android:name="releaseVersion" android:value="2007" />
<meta-data android:name="nlpServiceIntent" android:value="com.google.android.location.internal.GMS_NLP" />
<meta-data android:name="minProtocolVersion"
android:value="1" />
<meta-data android:name="maxProtocolVersion"
android:value="1" />
<meta-data android:name="releaseVersion"
android:value="2007" />
<meta-data android:name="nlpServiceIntent"
android:value="com.google.android.location.internal.GMS_NLP" />
</service>
<service
@ -120,15 +122,19 @@
</intent-filter>
</service>
<activity android:name="org.microg.tools.AccountPickerActivity" android:exported="true"
android:excludeFromRecents="true" android:theme="@android:style/Theme.Holo.Dialog">
<activity android:name="org.microg.tools.AccountPickerActivity"
android:exported="true"
android:excludeFromRecents="true"
android:theme="@android:style/Theme.Holo.Dialog">
<intent-filter>
<action android:name="com.google.android.gms.common.account.CHOOSE_ACCOUNT" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<service android:name=".auth.GetToken" android:exported="true" />
<activity android:name=".auth.TokenActivity" android:exported="true" />
<service android:name=".auth.GetToken"
android:exported="true" />
<activity android:name=".auth.TokenActivity"
android:exported="true" />
</application>
</manifest>

44
build.gradle Normal file
View File

@ -0,0 +1,44 @@
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0'
}
}
apply plugin: 'com.android.application'
dependencies {
compile 'com.android.support:support-v4:21.0.2'
compile 'com.android.support:appcompat-v7:21.0.2'
compile project(':UnifiedNlpLib')
}
android {
/**
* Temporarily use Google APIs for the Maps API.
* Maps API v2 will stop redirecting to Maps API v1 in the future so this is
* not a big problem right now.
*/
compileSdkVersion 'Google Inc.:Google APIs:21'
buildToolsVersion "21.0.2"
lintOptions.abortOnError false
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
aidl.srcDirs = ['src']
res.srcDirs = ['res']
}
}
productFlavors {
GmsCore
}
}
if (file('user.gradle').exists()) {
apply from: 'user.gradle'
}

1
settings.gradle Normal file
View File

@ -0,0 +1 @@
include 'UnifiedNlpLib', 'UnifiedNlpLib:compat', 'UnifiedNlpApi'

View File

@ -187,7 +187,9 @@ public class GoogleMapImpl {
public void redraw() {
mapView.postInvalidate();
try {
((MapView.WrappedMapView) mapView.getWrapped()).postInvalidate();
Class.forName("com.google.android.maps.MapView.WrappedMapView")
.getDeclaredMethod("postInvalidate")
.invoke(MapView.class.getDeclaredMethod("getWrapped").invoke(mapView));
} catch (Exception e) {
Log.w(TAG, "MapView does not support extended microg features", e);
}