michael@2: buildscript { michael@2: repositories { michael@2: jcenter() michael@2: } michael@2: dependencies { michael@2: classpath 'com.android.tools.build:gradle:1.0.+' michael@2: } michael@2: } michael@2: michael@2: apply plugin: 'android' michael@2: michael@2: android { michael@2: compileSdkVersion 21 michael@2: buildToolsVersion "21.1.2" michael@2: defaultConfig { michael@2: applicationId 'com.europalab.caldavsyncadapter' michael@2: minSdkVersion 14 michael@2: targetSdkVersion 21 michael@2: } michael@2: sourceSets { michael@2: main { michael@2: manifest.srcFile 'AndroidManifest.xml' michael@2: java.srcDirs = ['src'] michael@2: resources.srcDirs = ['src'] michael@2: aidl.srcDirs = ['src'] michael@2: renderscript.srcDirs = ['src'] michael@2: res.srcDirs = ['res'] michael@2: assets.srcDirs = ['assets'] michael@2: } michael@2: } michael@2: buildTypes { michael@2: release { michael@20: minifyEnabled true michael@2: proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt' michael@2: } michael@2: } michael@2: packagingOptions { michael@2: exclude 'META-INF/LICENSE.txt' michael@2: exclude 'META-INF/NOTICE.txt' michael@2: } michael@2: productFlavors { michael@2: } michael@18: //dexOptions { michael@18: // preDexLibraries = false michael@18: //} michael@18: } michael@18: michael@18: // Kludgy attempt to patch ical4j michael@18: //task fixDeps(type: zip) { michael@18: // zip -d $cache/ical4j-*.jar net/fortuna/ical4j/model/TimeZoneRegistryImpl.class michael@18: // zip -d $cache/ical4j-*.jar net/fortuna/ical4j/util/ResourceLoader.class michael@18: //} michael@18: // Hack contains patched ical4j files michael@18: task patchIcal(type: Copy) { michael@18: from 'hack' michael@18: include 'model/' michael@18: include 'util/' michael@18: into 'src/net/fortuna/ical4j' michael@18: } michael@18: configure(patchIcal) { michael@18: group = BasePlugin.ASSEMBLE_TASK_NAME // Or BUILD_GROUP michael@18: description = 'Patch embedded ical4j dependency in a kludgy way' michael@18: } michael@18: task patchWipe(type: Delete) { michael@18: delete 'src/net' michael@18: } michael@18: configure(patchWipe) { michael@18: group = BasePlugin.ASSEMBLE_TASK_NAME // Or BUILD_GROUP michael@18: description = 'Deletes patched dependencies in a kludgy way' michael@18: } michael@18: project.afterEvaluate{ michael@18: clean.dependsOn(patchWipe) michael@18: compileDebugJava.dependsOn(patchIcal) michael@18: compileReleaseJava.dependsOn(patchIcal) michael@2: } michael@2: michael@2: dependencies { michael@2: compile 'com.android.support:support-v4:19.1.0' michael@15: compile 'org.mnode.ical4j:ical4j:1.0.6' michael@2: } michael@2: michael@2: allprojects { michael@2: repositories { michael@2: jcenter() michael@2: } michael@2: }