Skip to content
kai-morich edited this page Nov 14, 2019 · 3 revisions

Jitpack repository (default)

The library is typically consumed from jitpack.io with:

dependencies {
    implementation 'com.github.mik3y:usb-serial-for-android:2.x.y
}

When pushing to github with jitpack enabled, *.aar and *-sources.jar are automatically published by jitpack, even if no maven or maven-publish gradle plugin is used.

Jar

If you need a jar file (e.g. for cordova) run gradle task createFullJarRelease and use full.jar

Local maven repository

To use a local maven repository (e.g. for developing usb-serial-for-android enhancements and testing in your application) comment in

//apply from: 'publishToMavenLocal.gradle'

This script is not enabled by default, as it confuses jitpack.

In your application toplevel build.gradle file add mavenLocal repository

allprojects {
    repositories {
        mavenLocal()
        ...

To consume new changes you have to

  1. increase version in publishToMavenLocal.gradle
  2. run gradle task publishToMavenLocal
  3. adjust usb-serial-for-android version in your app/build.gradle

Instead of executing steps 1.+3. you could also use some gradle tricks to force dependency update

Clone this wiki locally