Skip to content

A plugin to publish artifacts(android apk, mapping.txt and R.txt) required by Tencent Tinker.

License

Notifications You must be signed in to change notification settings

noproxy/tinker-maven-publish

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tinker Maven Publish Plugin

This is a gradle plugin to publish the artifacts required by Tencent Tinker. It includes the android apk, mapping.txt and R.txt. In next build, if you set the baseVersion, this plugin will download artifacts and set to Tinker.

How to integrate

  1. Using the plugins DSL:

plugins {
  id "io.github.noproxy.tinker-maven-publish" version "0.0.1"
}
  1. Using legacy plugin application:

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath "io.github.noproxy:tinker-maven-publish:0.0.1"
  }
}

apply plugin: "io.github.noproxy.tinker-maven-publish"

How to configure

// this repo will be used to upload
publishing {
    repositories {
        maven {
            url 'https://to.your.private.maven.repo/'
            name 'PrivateRepo'
        }
    }
}

// all values in the extension have default value. You can simply leave out.
tinkerPublish {
    // default is the version name of your appliaction
    // this version is used to upload
    version = "1.1.0"

    // default "org.tinker.app"
    groupId = "org.tinker.app"

    // default is the 'applicationId' of your application
    artifactId = "you artifact id"
}

// this will used to download
repositories {
    maven {
        url 'https://to.your.private.maven.repo/'
        name 'PrivateRepo'
    }
}

tinkerResolver {
    // version of the base apk, before Tinker build, we will download all files
    version = "1.0.1"
}

/*
    // If you want set local file as basement:
tinkerResolver {
    apk = 'local_file/1.0.1.apk'
    mapping = 'local_file/1.0.1-mapping.txt'
    symbol = 'local_file/1.0.1-symbol.txt'
}
*/
 */

How to use

build and upload apk, mapping.txt and R.txt.

Run:

./gradlew publishAppReleasePublicationToPrivateRepo

The PrivateRepo is the name of the maven repository you add in publishing {} block.

specific version to build tinker patch

You should set the baseVersion by 'tinkerResolver.version = 'xxx''.

tinkerResolver {
    version = "1.0.1"
}
Note
If you don’t have any previous version, please set version to null. Because unresolved dependencies will cause the build abort.

Then:

./gradlew tinkerPatchRelease

About

A plugin to publish artifacts(android apk, mapping.txt and R.txt) required by Tencent Tinker.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published