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.
-
Using the plugins DSL:
plugins {
id "io.github.noproxy.tinker-maven-publish" version "0.0.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"
// 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'
}
*/
*/Run:
./gradlew publishAppReleasePublicationToPrivateRepoThe PrivateRepo is the name of the maven repository you add in publishing {} block.
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