ru.tinkoff.gradle:jarjar

Plugin for gradle which allows you to repackage jar-libraries with different package names using JarJar tool.

License

License

Categories

Categories

Gradle Build Tools
GroupId

GroupId

ru.tinkoff.gradle
ArtifactId

ArtifactId

jarjar
Last Version

Last Version

1.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

ru.tinkoff.gradle:jarjar
Plugin for gradle which allows you to repackage jar-libraries with different package names using JarJar tool.
Project URL

Project URL

https://github.com/TinkoffCreditSystems/gradle-jarjar
Source Code Management

Source Code Management

https://github.com/TinkoffCreditSystems/gradle-jarjar

Download jarjar

How to add to project

<!-- https://jarcasting.com/artifacts/ru.tinkoff.gradle/jarjar/ -->
<dependency>
    <groupId>ru.tinkoff.gradle</groupId>
    <artifactId>jarjar</artifactId>
    <version>1.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/ru.tinkoff.gradle/jarjar/
implementation 'ru.tinkoff.gradle:jarjar:1.1.0'
// https://jarcasting.com/artifacts/ru.tinkoff.gradle/jarjar/
implementation ("ru.tinkoff.gradle:jarjar:1.1.0")
'ru.tinkoff.gradle:jarjar:jar:1.1.0'
<dependency org="ru.tinkoff.gradle" name="jarjar" rev="1.1.0">
  <artifact name="jarjar" type="jar" />
</dependency>
@Grapes(
@Grab(group='ru.tinkoff.gradle', module='jarjar', version='1.1.0')
)
libraryDependencies += "ru.tinkoff.gradle" % "jarjar" % "1.1.0"
[ru.tinkoff.gradle/jarjar "1.1.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

Gradle JarJar Repackage Plugin

Plugin for gradle which allows you to repackage jar-libraries with different package names using JarJar tool.

In Android development there are some situations when library packaged inside your *.apk-file already exists on the device firmware. In such case java class loader prefer device's library version instead of your own packaged inside an *.apk. If you using newest version of library than that that exists on a device you can stuck in a trouble. Your newest library version can have changed signatures which can cause a runtime exception.

For example on some HTC devices there are pre-installed GSON library for sereializing/desereializing to/from JSON. And if you use newest GSON version in your own project you'll get runtime errors with this.

Installation

Download the latest version or grab it via Gradle:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'ru.tinkoff.gradle:jarjar:1.1.0'
    }
}

apply plugin: 'ru.tinkoff.gradle.jarjar'

dependencies {
    // Which artifacts should be repackaged
    jarJar 'com.google.code.gson:gson:2.3'

    // Repackaged jars will be placed here, adding them to classpath
    compile fileTree(dir: './build/libs', include: ['*.jar'])
}

jarJar {
    // OPTIONAL - jarjar artifact from Central Repository
    jarJarDependency 'com.googlecode.jarjar:jarjar:1.3'

    // Dependencies and related JarJar rules
    rules = ['gson-2.3.jar': 'com.google.gson.** ru.tinkoff.core.gson.@1']
}

License

Plugin available under MIT license

ru.tinkoff.gradle

Tinkoff.ru

Online financial ecosystem

Versions

Version
1.1.0