diff --git a/.github/workflows/reader.yml b/.github/workflows/reader.yml
new file mode 100644
index 0000000..664e699
--- /dev/null
+++ b/.github/workflows/reader.yml
@@ -0,0 +1,35 @@
+name: Android CI
+
+on:
+ release:
+ types: [published]
+ push:
+ branches:
+ - master
+ pull_request:
+ branches:
+ - master
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ # 获取打包秘钥
+ - name: Checkout Android Keystore
+ uses: actions/checkout@v2
+ with:
+ repository: fengyuecanzhu/Key
+ token: ${{ secrets.KEY_TOKEN }} # 连接仓库的token,需要单独配置
+ path: keystore # 仓库的根目录名
+ # 打包release
+ - name: Build With Gradle
+ run: |
+ echo "开始进行release构建"
+ chmod +x gradlew
+ ./gradlew assembleAppRelease --parallel
+ - name: Upload App To Artifact
+ uses: actions/upload-artifact@v2
+ with:
+ name: fyreader apk
+ path: ${{ github.workspace }}/app/build/outputs/apk/app/release/*.apk
diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser
deleted file mode 100644
index 5cd7f7f..0000000
Binary files a/.idea/caches/build_file_checksums.ser and /dev/null differ
diff --git a/.idea/markdown-navigator-enh.xml b/.idea/markdown-navigator-enh.xml
new file mode 100644
index 0000000..a8fcc84
--- /dev/null
+++ b/.idea/markdown-navigator-enh.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/markdown-navigator.xml b/.idea/markdown-navigator.xml
new file mode 100644
index 0000000..a2fc086
--- /dev/null
+++ b/.idea/markdown-navigator.xml
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml
new file mode 100644
index 0000000..797acea
--- /dev/null
+++ b/.idea/runConfigurations.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/build.gradle b/app/build.gradle
index dbdf47a..7f2ab15 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -49,6 +49,14 @@ def getVersionName(){
def versionN = getVersionName()
+// 读取keystore.properties
+def keyProps = new Properties()
+def keyPropsFile = rootProject.file('keystore/keystore.properties')
+if (keyPropsFile.exists()) {
+ keyProps.load(new FileInputStream(keyPropsFile))
+}
+
+
android {
compileSdkVersion 29
buildToolsVersion '29.0.3'
@@ -60,7 +68,16 @@ android {
versionName versionN
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
-
+
+ signingConfigs {
+ myConifg {
+ keyAlias keyProps['keyAlias']
+ keyPassword keyProps['keyPassword']
+ storeFile keyProps['storeFile'] ? file(keyProps['storeFile']) : null
+ storePassword keyProps['storePassword']
+ }
+ }
+
buildFeatures {
viewBinding true
}
@@ -72,12 +89,19 @@ android {
ndk {
abiFilters "x86", "armeabi", "armeabi-v7a"
}
+ if (keyPropsFile.exists()) {
+ signingConfig signingConfigs.myConifg
+ }
}
debug {
ndk {
abiFilters "x86", "armeabi", "armeabi-v7a"
}
+ minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ if (keyPropsFile.exists()) {
+ signingConfig signingConfigs.myConifg
+ }
}
android.applicationVariants.all { variant ->
variant.outputs.all {
diff --git a/gradlew b/gradlew
old mode 100644
new mode 100755