Tools for the Gradle Crack plugin
Homepage Repository Rubygems Groovy Documentation Download
gem install cl_crack -v 0.0.8
6.3.0
(November 30th, 2017)
063F E7CB 4F32 4914 996E 388F BA2F 0C52 1F33 83EF
This project is a Gradle plugin for Android projects. It helps deal with some of build script's placeholders in some XML resource files, which official Build tools don't support.
Supported placeholders:
${applicationId}
${versionCode}
${versionName}
Supported resource directories, XML tags and sub tags:
values*
:::xml
<resources>
<string/>
xml*
:::xml
<account-authenticator/>
<ContactsSource>
<ContactsDataKind/>
<searchable/>
<sync-adapter/>
build.gradle
:::gradle
buildscript {
repositories {
...
maven { url 'https://haibison.bitbucket.io/maven-repos' }
}
dependencies {
...
classpath 'haibison.android:crack:x.x.x'
}
}
Notes:
x.x.x
with actual release version number.1.0.0
to Gradle Plugins. However for newer versions, we only support above repository
URL.app/build.gradle
(or similar)
:::gradle
...
android {
...
}
// Applying *after* `android {}` block
apply plugin: 'haibison.android.crack'
Logging
The plugin prints log with this string as prefix: CRACK_ED126C09_x.x.x
. For example:
:::shell
...
CRACK_ED126C09_1.0.1: xml/searchable.xml
BuildConfig.TAG
To have the plugin generate BuildConfig.TAG
, you can add one extension to your project:
:::gradle
project.extensions.add(haibison.android.crack.Crack.EXT_TAG_PREFIX, 'YOUR-TAG-PREFIX_')
It will generate TAG
in this form: YOUR-TAG-PREFIX_
CRC32-OF-APPLICATION-ID
_
VERSION-CODE
. For example:
:::java
YOUR-TAG-PREFIX_ABCDEF678_9