From 0801bafdeb47a5f126a571cae4719e44762ac408 Mon Sep 17 00:00:00 2001 From: caoyanglee Date: Wed, 13 Apr 2022 11:57:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=9D=E8=AF=95=E4=B8=8A=E4=BC=A0=E5=BA=93?= =?UTF-8?q?=E5=88=B0jitpack?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../weimu/io/silentupdatedemo/KotlinDemoActivity.kt | 1 + build.gradle | 2 +- lib/build.gradle | 11 ++++++++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/www/weimu/io/silentupdatedemo/KotlinDemoActivity.kt b/app/src/main/java/www/weimu/io/silentupdatedemo/KotlinDemoActivity.kt index e1f7f80..3d46b4a 100644 --- a/app/src/main/java/www/weimu/io/silentupdatedemo/KotlinDemoActivity.kt +++ b/app/src/main/java/www/weimu/io/silentupdatedemo/KotlinDemoActivity.kt @@ -37,6 +37,7 @@ class KotlinDemoActivity : AppCompatActivity() { private fun getLatestApk() { //具体的网络请求步骤自己操作 MainScope().launch { + //http://file.market.xiaomi.com/download/AppStore/09867a8623a9f4d3f954993da6e33b06f74a7a51b/com.pmm.remember_0.7.3_patch8.apk val to = CheckVersionResultPO( apkUrl = "", latestVersion = "1.1.2" diff --git a/build.gradle b/build.gradle index 60c1b3c..20b0a9b 100644 --- a/build.gradle +++ b/build.gradle @@ -21,7 +21,7 @@ buildscript { maven { url 'https://maven.aliyun.com/repository/google' }//阿里云 google } dependencies { - classpath 'com.android.tools.build:gradle:7.1.3' + classpath 'com.android.tools.build:gradle:7.0.3' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.2' classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' diff --git a/lib/build.gradle b/lib/build.gradle index 4eba2e1..f2570f3 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -32,7 +32,16 @@ android { kotlinOptions { jvmTarget = "1.8" } - + //jitpack + project.afterEvaluate { + publishing { + publications { + release(MavenPublication) { + from components.release + } + } + } + } } dependencies {