diff --git a/README.md b/README.md index d7538e9..1617c55 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ ![Image](app/src/main/ic_launcher-web.png) [![Download](https://img.shields.io/badge/download-App-blue.svg)](https://raw.githubusercontent.com/jenly1314/ZXingLite/master/app/release/app-release.apk) +[![MavenCentral](https://img.shields.io/maven-central/v/com.github.jenly1314/zxing-lite)](https://repo1.maven.org/maven2/com/github/jenly1314/zxing-lite) [![JCenter](https://img.shields.io/badge/JCenter-2.0.3-46C018.svg)](https://bintray.com/beta/#/jenly/maven/zxing-lite) [![JitPack](https://jitpack.io/v/jenly1314/ZXingLite.svg)](https://jitpack.io/#jenly1314/ZXingLite) [![CI](https://travis-ci.org/jenly1314/ZXingLite.svg?branch=master)](https://travis-ci.org/jenly1314/ZXingLite) @@ -54,9 +55,31 @@ ZXingLite for Android 是ZXing的精简版,基于ZXing库优化扫码和生成 ## 引入 +> 由于2021年2月3日 **JFrog宣布将关闭Bintray和JCenter,计划在2022年2月完全关闭。** 所以后续版本不再发布至 **JCenter** + ### Gradle: -最新版本 +1. 在Project的 **build.gradle** 里面添加远程仓库 + +```gradle +allprojects { + repositories { + //... + mavenCentral() + } +} +``` + +2. 在Module的 **build.gradle** 里面添加引入依赖项 + +```gradle +//AndroidX 版本 +implementation 'com.github.jenly1314:zxing-lite:2.1.0' + +``` + + +以前发布至JCenter的版本 ```gradle //AndroidX 版本 implementation 'com.king.zxing:zxing-lite:2.0.3' @@ -72,17 +95,6 @@ implementation 'com.king.zxing:zxing-lite:1.1.9-androidx' implementation 'com.king.zxing:zxing-lite:1.1.9' ``` - -###### 如果Gradle出现compile失败的情况,可以在Project的build.gradle里面添加如下:(也可以使用上面的JitPack来compile) -```gradle -allprojects { - repositories { - //... - maven { url 'https://dl.bintray.com/jenly/maven' } - } -} -``` - ## 版本说明 ### v2.x 基于CameraX重构震撼发布 @@ -244,6 +256,10 @@ compileOptions { ## 版本记录 +#### v2.1.0:2021-6-30 (从v2.1.0开始不再发布至JCenter) +* 更新CameraX至v1.0.0 +* 优化细节 + #### v2.0.3:2021-3-26 * 更新CameraX至v1.0.0-rc03 * 优化一些默认配置 diff --git a/app/release/app-release.apk b/app/release/app-release.apk index c1a91c6..42ab15f 100644 Binary files a/app/release/app-release.apk and b/app/release/app-release.apk differ diff --git a/app/release/output.json b/app/release/output.json index b05ff2a..6585258 100644 --- a/app/release/output.json +++ b/app/release/output.json @@ -1 +1 @@ -[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":30,"versionName":"2.0.3","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release","dirName":""},"path":"app-release.apk","properties":{}}] \ No newline at end of file +[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":31,"versionName":"2.1.0","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release","dirName":""},"path":"app-release.apk","properties":{}}] \ No newline at end of file diff --git a/build.gradle b/build.gradle index 2acaa0a..130e211 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,8 @@ buildscript { dependencies { classpath "com.android.tools.build:gradle:$versions.gralde" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$versions.kotlin" - classpath "com.novoda:bintray-release:$versions.bintray_release" +// classpath "com.novoda:bintray-release:$versions.bintray_release" + classpath "com.vanniktech:gradle-maven-publish-plugin:$versions.mavenPublish" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } diff --git a/gradle.properties b/gradle.properties index 7a3858e..0b0305b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -12,4 +12,24 @@ org.gradle.jvmargs = -Xmx1536m # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true android.useAndroidX=true -android.enableJetifier=true \ No newline at end of file +android.enableJetifier=true + +VERSION_NAME=2.1.0 +VERSION_CODE=31 +GROUP=com.github.jenly1314 + +POM_DESCRIPTION=ZXingLite for Android +POM_URL=https://github.com/jenly1314/ZXingLite +POM_SCM_URL=https://github.com/jenly1314/ZXingLite +POM_SCM_CONNECTION=scm:git@github.com:jenly1314/ZXingLite.git +POM_SCM_DEV_CONNECTION=scm:git@github.com:jenly1314/ZXingLite.git +#POM_LICENCE_NAME=The MIT License +#POM_LICENCE_URL=https://opensource.org/licenses/mit-license.php +POM_LICENCE_NAME=The Apache Software License, Version 2.0 +POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt +POM_DEVELOPER_ID=jenly +POM_DEVELOPER_NAME=Jenly Yu +RELEASE_REPOSITORY_URL=https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ +SNAPSHOT_REPOSITORY_URL=https://s01.oss.sonatype.org/content/repositories/snapshots/ +RELEASE_SIGNING_ENABLED=false + diff --git a/update_log.md b/update_log.md index d40fb9f..aa825f9 100644 --- a/update_log.md +++ b/update_log.md @@ -1,5 +1,9 @@ ## 版本记录 +#### v2.1.0:2021-6-30 (从v2.1.0开始不再发布至JCenter) +* 更新CameraX至v1.0.0 +* 优化细节 + #### v2.0.3:2021-3-26 * 更新CameraX至v1.0.0-rc03 * 优化一些默认配置 diff --git a/versions.gradle b/versions.gradle index 84642c0..13b7f93 100644 --- a/versions.gradle +++ b/versions.gradle @@ -1,7 +1,7 @@ //App def app_version = [:] -app_version.versionCode = 30 -app_version.versionName = "2.0.3" +app_version.versionCode = 31 +app_version.versionName = "2.1.0" ext.app_version = app_version //build version @@ -28,6 +28,7 @@ versions.runner = "1.2.0" versions.espresso = "3.2.0" versions.bintray_release = "0.9.2" +versions.mavenPublish = '0.13.0' versions.gralde = "3.6.3" versions.kotlin = "1.4.10" versions.coreKtx = "1.3.2" @@ -35,7 +36,7 @@ versions.coreKtx = "1.3.2" //zxing versions.zxing = "3.3.3" -versions.camerax = "1.0.0-rc03" +versions.camerax = "1.0.0" versions.easypermissions = "3.0.0" @@ -68,7 +69,7 @@ deps.zxing = "com.google.zxing:core:$versions.zxing" deps.camera_core = "androidx.camera:camera-core:$versions.camerax" deps.camera_camera2 = "androidx.camera:camera-camera2:$versions.camerax" deps.camera_lifecycle = "androidx.camera:camera-lifecycle:$versions.camerax" -deps.camera_view = "androidx.camera:camera-view:1.0.0-alpha20" +deps.camera_view = "androidx.camera:camera-view:1.0.0-alpha25" //permission diff --git a/zxing-lite/build.gradle b/zxing-lite/build.gradle index 90ee12c..beeedb8 100644 --- a/zxing-lite/build.gradle +++ b/zxing-lite/build.gradle @@ -1,5 +1,6 @@ apply plugin: 'com.android.library' -apply from: 'bintray.gradle' +//apply from: 'bintray.gradle' +apply plugin: "com.vanniktech.maven.publish" android { compileSdkVersion build_versions.compileSdk