From 8e4f76b2d36cb72003a7d71692e3c20098a906b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E7=81=BF=E8=BE=89?= <122565648@qq.com> Date: Sun, 22 Mar 2020 23:20:13 +0800 Subject: [PATCH] Config publish library to jcenter --- build.gradle | 3 ++- library/build.gradle | 15 +++++++++++++++ secret.gradle | 8 ++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 secret.gradle diff --git a/build.gradle b/build.gradle index 9494940..fb4f86f 100644 --- a/build.gradle +++ b/build.gradle @@ -9,7 +9,8 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:3.6.1' - + + classpath 'com.novoda:bintray-release:0.9.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/library/build.gradle b/library/build.gradle index 7b04c11..5a6eada 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -1,4 +1,7 @@ apply plugin: 'com.android.library' +apply plugin: 'com.novoda.bintray-release' +apply from: rootProject.file("secret.gradle") + android { compileSdkVersion 29 @@ -50,3 +53,15 @@ dependencies { androidTestImplementation 'androidx.test.ext:junit:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' } + +publish { + userOrg = 'xch168' // bintray.com用户名 + groupId = 'com.github.xch168' // jcenter上的路径 + artifactId = 'FFmpeg-Invoker' // 项目名称 + publishVersion = '0.0.1' // 版本号 + desc = 'Invoker ffmpeg on Android' // 描述 + website = 'https://github.com/xch168/FFmpeg-Invoker' // 项目地址 + + bintrayUser = bintray_user // bintray.com的用户名 + bintrayKey = bintray_key // bintray.com的API key +} diff --git a/secret.gradle b/secret.gradle new file mode 100644 index 0000000..33d41d9 --- /dev/null +++ b/secret.gradle @@ -0,0 +1,8 @@ +//加载资源 +Properties properties = new Properties() +InputStream inputStream = project.rootProject.file('local.properties').newDataInputStream() +properties.load( inputStream ) + +//读取字段 +ext.bintray_key = properties.getProperty('bintray.key') +ext.bintray_user = properties.getProperty('bintray.user') \ No newline at end of file