Posts Tagged ‘Gradle’

Gradle Android Plugin 0.9.8

Posted: February 22, 2011 in Android, Java

In Gradle android Plugin 0.9.8 you can now have AIDL files processed automatically(my code contribution) also some other neat additions. Another developer is working on support for the Test stuff, I think that might be 0.9.9 which is upcoming.

Android Gradle Plugin

Posted: June 6, 2010 in Android
Tags: ,

Some one created a gradle android plugin. The problem I see is that instead of adjusting sourceSets in the plugin from the defaults of src/main/java, etc they make the user of the plugin do a manual adjust of the src files, not good.

I use proguard settings specific to Android Java applications so change to fit your needs before using:

task generateProguardConfigFile << {'Creating file for obfsucate task') /** * must have the following text * (the variables are replaced as the fiel is created): * -libraryjars androidJar: externalLibsFolder * -injars outClassesLocation * -outjars obfuscateLocation/classes.min.jar * -keep public class * extends * -optimizations !code/simplification/cast * -allowaccessmodification * * '\n' goes at end of each line */ andcooperProguardConfig = new file('') andcooperProguardConfig.withWriter{ writer ->
writer << ‘-libraryjars ’ + androidJar + '; ' + externalLibsFolder + '\n' writer << ‘-injars ' + outClassesLocation + '\n' writer << '-outjars ' + obfuscateLocation + '/classes.min.jar' + '\n' writer << '-keep public class * extends' + '\n' writer << '-optimizations !code/simplification/cast' + '\n' writer << '-allowaccessmodification' + '\n' } } task obfuscate << { ant.taskdef(resource: 'proguard/ant/', classpath: configurations.runtime.asPath ) ant.proguard(configuration: '') } [/sourcecode] Notice all I am doing is creating the file on-the-fly and than using that in my taskdef via the ANTBuilder.

Reblog this post [with Zemanta]