Last active
August 29, 2015 14:10
-
-
Save Pierry/b3eab411c8865573b985 to your computer and use it in GitHub Desktop.
Buidle Gradle - Root and App
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4' | |
} | |
} | |
repositories { | |
mavenCentral() | |
mavenLocal() | |
} | |
apply plugin: 'com.android.application' | |
apply plugin: 'android-apt' | |
def AAVersion = '3.1' | |
dependencies { | |
compile 'com.android.support:appcompat-v7:21.0.0' | |
apt "org.androidannotations:androidannotations:$AAVersion" | |
compile "org.androidannotations:androidannotations:$AAVersion" | |
} | |
apt { | |
arguments { | |
androidManifestFile variant.outputs[0].processResources.manifestFile | |
resourcePackageName 'your complete manifest package name' | |
} | |
} | |
android { | |
compileSdkVersion 21 (Important!) | |
buildToolsVersion '20.0.0' (Important!) | |
defaultConfig { | |
minSdkVersion 11 | |
targetSdkVersion 21 | |
} | |
sourceSets { | |
main { | |
manifest.srcFile 'src/main/AndroidManifest.xml' | |
java.srcDirs = ['src/main/java', 'build/generated/source/apt/${variant.dirName}'] | |
resources.srcDirs = ['src/main/res'] | |
res.srcDirs = ['src/main/res'] | |
assets.srcDirs = ['assets'] | |
} | |
} | |
packagingOptions { | |
exclude 'META-INF/DEPENDENCIES.txt' | |
exclude 'META-INF/LICENSE.txt' | |
exclude 'META-INF/NOTICE.txt' | |
exclude 'META-INF/NOTICE' | |
exclude 'META-INF/LICENSE' | |
exclude 'META-INF/DEPENDENCIES' | |
exclude 'META-INF/notice.txt' | |
exclude 'META-INF/license.txt' | |
exclude 'META-INF/dependencies.txt' | |
exclude 'META-INF/LGPL2.1' | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Top-level build file where you can add configuration options common to all sub-projects/modules. | |
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:1.0.0' | |
} | |
} | |
allprojects { | |
repositories { | |
mavenCentral() | |
} | |
} |
change:
androidManifestFile variant.processResources.manifestFile
to:
androidManifestFile variant.outputs[0].processResources.manifestFile
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How about the:
"Error: Could not find property 'processResources' on com.android.build.gradle.internal.api.ApplicationVariantImpl_Decorated@48f217d0."
that points to:
"androidManifestFile variant.processResources.manifestFile" ?