Skip to content

mmadev/android-gradle-plugin

 
 

Repository files navigation

android-gradle-plugin [Deprecated: official AOSP 0.14.2+ already merged.]

Import from aosp https://android.googlesource.com/platform/tools/base 0.14.1

  • Support multiDexKeepProguard file('multiDexKeep.pro')
  • Support multiDexKeepFile file('multiDexKeep.txt')
  • Fix wrong main dex file being used.

The official aosp 0.14.2+ already merged.

Usage

  • build.gradle:
android {
    defaultConfig {
        multiDexEnabled true
        multiDexKeepProguard file('multiDexKeep.pro') // keep specific classes using proguard syntax
        multiDexKeepFile file('multiDexKeep.txt') // keep specific classes
    }
}
dependencies {
    compile 'com.android.support:multidex:1.0.0'
}
  • multiDexKeep.pro for example (e.g. build/intermediates/multi-dex/debug/manifest_keep.txt):
-keep public class uk.co.senab.photoview.PhotoView {
    <init>();
}
  • multiDexKeep.txt for example (e.g. build/intermediates/multi-dex/debug/maindexlist.txt):
android/support/v4/json/JSONStringer$Scope.class
android/support/v4/json/JSONArray.class
android/support/v4/json/JSONStringer.class
android/support/v4/json/JSON.class
android/support/v4/json/JSONObject$1.class
android/support/v4/json/JSONObject.class

Installation

The precompiled maven has been pushed into https://github.com/yongjhih/android-gradle-plugin.m2:

buildscript {
    repositories {
        maven { url 'https://github.com/yongjhih/android-gradle-plugin.m2/raw/master/' }
        mavenCentral()
    }
    dependencies {
        classpath 'com.infstory.tools.build:gradle:0.14.+'
    }
}

Compilation

$ repo init -u https://android.googlesource.com/a/platform/manifest -b  gradle_0.13.3
$ repo sync
$ repo forall -c 'git checkout gradle_0.14.1'
$ cd base
$ git remote add yongjhih https://github.com/yongjhih/android-gradle-plugin
$ git checkout yongjhih/master
$ cd ..
$ ./gradlew prepareRepo
$ CUSTOM_GRADLE=0.14.2 ./gradlew clean assemble setupGradleInIde publishLocal

Finally, the archives are in {repo-root-dir}/out

Ref.

See Also

About

Import from aosp https://android.googlesource.com/platform/tools/base

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 94.7%
  • Groovy 2.6%
  • FreeMarker 1.7%
  • C 0.6%
  • RenderScript 0.3%
  • Shell 0.1%