liuyuqi-dellpc 4 years ago
parent
commit
731e8061b3

+ 1 - 0
.gitignore

@@ -14,3 +14,4 @@
 .cxx
 local.properties
 /.idea/
+/config.gradle

+ 9 - 0
README.md

@@ -0,0 +1,9 @@
+## Barcode
+
+条码识别app,替代扫码枪。
+
+[download it](https://downloads.yoqi.me/android/Barcode/app-release.apk).
+
+
+
+

+ 18 - 7
app/build.gradle

@@ -1,24 +1,35 @@
 plugins {
     id 'com.android.application'
 }
+def build = rootProject.ext.build
+def sign = rootProject.ext.sign
 
 android {
-    compileSdkVersion 29
+    signingConfigs {
+        release {
+            storeFile file(sign.storeFile)
+            keyAlias sign.keyAlias
+            keyPassword sign.keyPassword
+            storePassword sign.storePassword
+        }
+    }
+    compileSdkVersion build.compileSdkVersion
 
     defaultConfig {
-        applicationId "me.yoqi.android.barcode"
-        minSdkVersion 16
-        targetSdkVersion 29
-        versionCode 1
-        versionName "1.0"
+        applicationId build.applicationId
+        minSdkVersion build.minSdkVersion
+        targetSdkVersion build.targetSdkVersion
+        versionCode build.versionCode
+        versionName build.versionName
 
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
     }
 
     buildTypes {
         release {
-            minifyEnabled false
+            minifyEnabled true
             proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
+            signingConfig signingConfigs.release
         }
     }
     compileOptions {

+ 1 - 3
app/src/main/AndroidManifest.xml

@@ -2,12 +2,10 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="me.yoqi.android.barcode">
 
-
     <application
         android:allowBackup="true"
-        android:icon="@mipmap/ic_launcher"
+        android:icon="@drawable/logo"
         android:label="@string/app_name"
-        android:roundIcon="@mipmap/ic_launcher_round"
         android:supportsRtl="true"
         android:theme="@style/Theme.Barcode">
         <activity

BIN
app/src/main/res/drawable-hdpi/logo.png


BIN
app/src/main/res/drawable-mdpi/logo.png


BIN
app/src/main/res/drawable-xhdpi/logo.png


BIN
app/src/main/res/drawable-xxhdpi/logo.png


+ 1 - 0
build.gradle

@@ -1,4 +1,5 @@
 // Top-level build file where you can add configuration options common to all sub-projects/modules.
+apply from: "config.gradle"
 buildscript {
     repositories {
         google()

+ 16 - 0
config.bak.gradle

@@ -0,0 +1,16 @@
+ext {
+    build = [
+            applicationId     : "me.yoqi.android.barcode",
+            minSdkVersion     : 16,
+            targetSdkVersion  : 29,
+            compileSdkVersion : 29,
+            versionCode       : 11,
+            versionName       : "1.1.0",
+    ]
+    sign = [
+            keyAlias     : "key0",
+            keyPassword  : "coding321",
+            storeFile    : "C:\\Users\\liuyuqi\\OneDrive\\cert\\android\\coding-android-sign-dev.jks",
+            storePassword: "coding321",
+    ]
+}

+ 1 - 1
zxingscanview/build.gradle

@@ -17,7 +17,7 @@ android {
 
     buildTypes {
         release {
-            minifyEnabled false
+            minifyEnabled true
             proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
         }
     }