All Projects → yongjhih → android-gradle-plugin

yongjhih / android-gradle-plugin

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

Programming Languages

java
68154 projects - #9 most used programming language
groovy
2714 projects
FreeMarker
481 projects
c
50402 projects - #5 most used programming language
RenderScript
48 projects
shell
77523 projects

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. (https://android-review.googlesource.com/#/c/113606/ , https://android.googlesource.com/platform/tools/base/+/f8b049e8be9e5eba426a3edcac4cd4fe78d944c8)

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].