Construct a gradle configuration suitable for a Android sync adapter.

Tue, 10 Feb 2015 19:25:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 10 Feb 2015 19:25:00 +0100
changeset 2
dee028db6e9b
parent 1
16922eb04d75
child 3
73bdfa70b04e

Construct a gradle configuration suitable for a Android sync adapter.

.hgignore file | annotate | diff | comparison | revisions
AndroidManifest.xml file | annotate | diff | comparison | revisions
build.gradle file | annotate | diff | comparison | revisions
manifest-merger-release-report.txt file | annotate | diff | comparison | revisions
proguard-project.txt file | annotate | diff | comparison | revisions
project.properties file | annotate | diff | comparison | revisions
     1.1 --- a/.hgignore	Tue Feb 10 18:15:00 2015 +0100
     1.2 +++ b/.hgignore	Tue Feb 10 19:25:00 2015 +0100
     1.3 @@ -1,11 +1,22 @@
     1.4 +syntax: glob
     1.5 +*.orig
     1.6 +*.rej
     1.7 +*.swp
     1.8 +*.o
     1.9 +*~
    1.10 +
    1.11 +*.idea
    1.12 +*.iml
    1.13 +
    1.14 +bin
    1.15  gen
    1.16 -proguard/
    1.17 -bin
    1.18 +libs
    1.19 +build
    1.20 +proguard
    1.21  local.properties
    1.22  
    1.23 -# Ant
    1.24 -build.xml
    1.25 +gradle*
    1.26 +.gradle
    1.27  
    1.28 -# Android Studio
    1.29 -.idea
    1.30 -CalDAVSyncAdapter.iml
    1.31 +syntax: regexp
    1.32 +.*\#.*\#$
     2.1 --- a/AndroidManifest.xml	Tue Feb 10 18:15:00 2015 +0100
     2.2 +++ b/AndroidManifest.xml	Tue Feb 10 19:25:00 2015 +0100
     2.3 @@ -1,8 +1,8 @@
     2.4  <?xml version="1.0" encoding="utf-8"?>
     2.5  <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     2.6      package="org.gege.caldavsyncadapter"
     2.7 -    android:versionCode="18"
     2.8 -    android:versionName="1.8.1" >
     2.9 +    android:versionCode="19"
    2.10 +    android:versionName="1.8.2" >
    2.11  
    2.12      <uses-sdk
    2.13          android:minSdkVersion="14"
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/build.gradle	Tue Feb 10 19:25:00 2015 +0100
     3.3 @@ -0,0 +1,56 @@
     3.4 +buildscript {
     3.5 +    repositories {
     3.6 +        jcenter()
     3.7 +    }
     3.8 +    dependencies {
     3.9 +        classpath 'com.android.tools.build:gradle:1.0.+'
    3.10 +    }
    3.11 +}
    3.12 +
    3.13 +apply plugin: 'android'
    3.14 +
    3.15 +android {
    3.16 +    compileSdkVersion 21
    3.17 +    buildToolsVersion "21.1.2"
    3.18 +    defaultConfig {
    3.19 +        applicationId 'com.europalab.caldavsyncadapter'
    3.20 +        minSdkVersion 14
    3.21 +        targetSdkVersion 21
    3.22 +    }
    3.23 +    sourceSets {
    3.24 +        main {
    3.25 +            manifest.srcFile 'AndroidManifest.xml'
    3.26 +            java.srcDirs = ['src']
    3.27 +            resources.srcDirs = ['src']
    3.28 +            aidl.srcDirs = ['src']
    3.29 +            renderscript.srcDirs = ['src']
    3.30 +            res.srcDirs = ['res']
    3.31 +            assets.srcDirs = ['assets']
    3.32 +        }
    3.33 +    }
    3.34 +    buildTypes {
    3.35 +        release {
    3.36 +            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
    3.37 +        }
    3.38 +    }
    3.39 +    packagingOptions {
    3.40 +        exclude 'META-INF/LICENSE.txt'
    3.41 +        exclude 'META-INF/NOTICE.txt'
    3.42 +    }
    3.43 +    productFlavors {
    3.44 +    }
    3.45 +}
    3.46 +
    3.47 +dependencies {
    3.48 +    compile 'com.android.support:support-v4:19.1.0'
    3.49 +    compile 'backport-util-concurrent:backport-util-concurrent:3.1'
    3.50 +    compile 'org.apache.commons:commons-lang3:3.2'
    3.51 +    compile files('libs/commons-codec-1.10.jar')
    3.52 +    compile files('libs/commons-logging-1.2.jar')
    3.53 +}
    3.54 +
    3.55 +allprojects {
    3.56 +    repositories {
    3.57 +        jcenter()
    3.58 +    }
    3.59 +}
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/manifest-merger-release-report.txt	Tue Feb 10 19:25:00 2015 +0100
     4.3 @@ -0,0 +1,101 @@
     4.4 +-- Merging decision tree log ---
     4.5 +manifest
     4.6 +ADDED from AndroidManifest.xml:2:1
     4.7 +	package
     4.8 +		ADDED from AndroidManifest.xml:3:5
     4.9 +		INJECTED from AndroidManifest.xml:0:0
    4.10 +		INJECTED from AndroidManifest.xml:0:0
    4.11 +	android:versionName
    4.12 +		ADDED from AndroidManifest.xml:5:5
    4.13 +	android:versionCode
    4.14 +		ADDED from AndroidManifest.xml:4:5
    4.15 +		INJECTED from AndroidManifest.xml:0:0
    4.16 +		INJECTED from AndroidManifest.xml:0:0
    4.17 +	xmlns:android
    4.18 +		ADDED from AndroidManifest.xml:2:11
    4.19 +uses-sdk
    4.20 +ADDED from AndroidManifest.xml:7:5
    4.21 +	android:targetSdkVersion
    4.22 +		ADDED from AndroidManifest.xml:9:9
    4.23 +		INJECTED from AndroidManifest.xml:0:0
    4.24 +		INJECTED from AndroidManifest.xml:0:0
    4.25 +	android:minSdkVersion
    4.26 +		ADDED from AndroidManifest.xml:8:9
    4.27 +		INJECTED from AndroidManifest.xml:0:0
    4.28 +		INJECTED from AndroidManifest.xml:0:0
    4.29 +uses-permission#android.permission.AUTHENTICATE_ACCOUNTS
    4.30 +ADDED from AndroidManifest.xml:11:5
    4.31 +	android:name
    4.32 +		ADDED from AndroidManifest.xml:11:22
    4.33 +uses-permission#android.permission.READ_CALENDAR
    4.34 +ADDED from AndroidManifest.xml:12:5
    4.35 +	android:name
    4.36 +		ADDED from AndroidManifest.xml:12:22
    4.37 +uses-permission#android.permission.WRITE_CALENDAR
    4.38 +ADDED from AndroidManifest.xml:13:5
    4.39 +	android:name
    4.40 +		ADDED from AndroidManifest.xml:13:22
    4.41 +uses-permission#android.permission.INTERNET
    4.42 +ADDED from AndroidManifest.xml:14:5
    4.43 +	android:name
    4.44 +		ADDED from AndroidManifest.xml:14:22
    4.45 +application
    4.46 +ADDED from AndroidManifest.xml:16:5
    4.47 +	android:label
    4.48 +		ADDED from AndroidManifest.xml:19:9
    4.49 +	android:allowBackup
    4.50 +		ADDED from AndroidManifest.xml:17:9
    4.51 +	android:icon
    4.52 +		ADDED from AndroidManifest.xml:18:9
    4.53 +	android:theme
    4.54 +		ADDED from AndroidManifest.xml:20:9
    4.55 +service#org.gege.caldavsyncadapter.syncadapter.SyncService
    4.56 +ADDED from AndroidManifest.xml:21:9
    4.57 +	android:exported
    4.58 +		ADDED from AndroidManifest.xml:23:13
    4.59 +	android:name
    4.60 +		ADDED from AndroidManifest.xml:22:13
    4.61 +intent-filter#android.content.SyncAdapter
    4.62 +ADDED from AndroidManifest.xml:24:13
    4.63 +action#android.content.SyncAdapter
    4.64 +ADDED from AndroidManifest.xml:25:17
    4.65 +	android:name
    4.66 +		ADDED from AndroidManifest.xml:25:25
    4.67 +meta-data#android.content.SyncAdapter
    4.68 +ADDED from AndroidManifest.xml:28:13
    4.69 +	android:resource
    4.70 +		ADDED from AndroidManifest.xml:30:17
    4.71 +	android:name
    4.72 +		ADDED from AndroidManifest.xml:29:17
    4.73 +service#org.gege.caldavsyncadapter.authenticator.AuthenticationService
    4.74 +ADDED from AndroidManifest.xml:32:9
    4.75 +	android:exported
    4.76 +		ADDED from AndroidManifest.xml:34:13
    4.77 +	android:name
    4.78 +		ADDED from AndroidManifest.xml:33:13
    4.79 +intent-filter#android.accounts.AccountAuthenticator
    4.80 +ADDED from AndroidManifest.xml:35:13
    4.81 +action#android.accounts.AccountAuthenticator
    4.82 +ADDED from AndroidManifest.xml:36:17
    4.83 +	android:name
    4.84 +		ADDED from AndroidManifest.xml:36:25
    4.85 +meta-data#android.accounts.AccountAuthenticator
    4.86 +ADDED from AndroidManifest.xml:39:13
    4.87 +	android:resource
    4.88 +		ADDED from AndroidManifest.xml:41:17
    4.89 +	android:name
    4.90 +		ADDED from AndroidManifest.xml:40:17
    4.91 +activity#org.gege.caldavsyncadapter.authenticator.AuthenticatorActivity
    4.92 +ADDED from AndroidManifest.xml:44:9
    4.93 +	android:label
    4.94 +		ADDED from AndroidManifest.xml:46:13
    4.95 +	android:windowSoftInputMode
    4.96 +		ADDED from AndroidManifest.xml:47:13
    4.97 +	android:name
    4.98 +		ADDED from AndroidManifest.xml:45:13
    4.99 +activity#org.gege.caldavsyncadapter.SyncStatusReportActivity
   4.100 +ADDED from AndroidManifest.xml:49:9
   4.101 +	android:label
   4.102 +		ADDED from AndroidManifest.xml:51:13
   4.103 +	android:name
   4.104 +		ADDED from AndroidManifest.xml:50:13
     5.1 --- a/proguard-project.txt	Tue Feb 10 18:15:00 2015 +0100
     5.2 +++ b/proguard-project.txt	Tue Feb 10 19:25:00 2015 +0100
     5.3 @@ -20,10 +20,8 @@
     5.4      public static *** v(...);
     5.5  }
     5.6  
     5.7 --libraryjars libs/backport-util-concurrent-3.1.jar
     5.8 --libraryjars libs/commons-codec-1.5.jar
     5.9 --libraryjars libs/commons-lang-2.6.jar
    5.10 --libraryjars libs/commons-logging-1.1.1.jar
    5.11 +-libraryjars libs/commons-codec-1.10.jar
    5.12 +-libraryjars libs/commons-logging-1.2.jar
    5.13  
    5.14  
    5.15  -dontwarn org.apache.**
     6.1 --- a/project.properties	Tue Feb 10 18:15:00 2015 +0100
     6.2 +++ b/project.properties	Tue Feb 10 19:25:00 2015 +0100
     6.3 @@ -11,4 +11,4 @@
     6.4  proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
     6.5  
     6.6  # Project target.
     6.7 -target=android-18
     6.8 +target=android-19

mercurial