diff --git a/app/build.gradle b/app/build.gradle
index 41b50ac59..66c464856 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -7,21 +7,51 @@ androidExtensions {
experimental = true
}
+static def releaseTime() {
+ return new Date().format("yy.MMddHH", TimeZone.getTimeZone("GMT+8"))
+}
+
+def name = "legado"
+def version = "0." + releaseTime()
+def gitCommits = Integer.parseInt('git rev-list --count HEAD'.execute([], project.rootDir).text.trim())
+
android {
compileSdkVersion 28
+ signingConfigs {
+ myConfig {
+ storeFile file(RELEASE_STORE_FILE)
+ storePassword RELEASE_KEY_PASSWORD
+ keyAlias RELEASE_KEY_ALIAS
+ keyPassword RELEASE_STORE_PASSWORD
+ }
+ }
defaultConfig {
applicationId "io.legado.app"
minSdkVersion 21
targetSdkVersion 28
- versionCode 1
- versionName "1.0"
+ versionCode gitCommits
+ versionName version
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+ project.ext.set("archivesBaseName", name + "_" + version)
}
buildTypes {
release {
+ signingConfig signingConfigs.myConfig
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
+ debug {
+ signingConfig signingConfigs.myConfig
+ applicationIdSuffix '.debug'
+ versionNameSuffix 'debug'
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ }
+ android.applicationVariants.all { variant ->
+ variant.outputs.all {
+ outputFileName = "${name}_${defaultConfig.versionName}.apk"
+ }
+ }
}
compileOptions {
diff --git a/app/src/main/res/layout/fragment_book_source.xml b/app/src/main/res/layout/fragment_book_source.xml
new file mode 100644
index 000000000..fb3d8a258
--- /dev/null
+++ b/app/src/main/res/layout/fragment_book_source.xml
@@ -0,0 +1,7 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_bookshelf.xml b/app/src/main/res/layout/fragment_bookshelf.xml
new file mode 100644
index 000000000..fb3d8a258
--- /dev/null
+++ b/app/src/main/res/layout/fragment_bookshelf.xml
@@ -0,0 +1,7 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_find_book.xml b/app/src/main/res/layout/fragment_find_book.xml
new file mode 100644
index 000000000..fb3d8a258
--- /dev/null
+++ b/app/src/main/res/layout/fragment_find_book.xml
@@ -0,0 +1,7 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_my.xml b/app/src/main/res/layout/fragment_my.xml
new file mode 100644
index 000000000..fb3d8a258
--- /dev/null
+++ b/app/src/main/res/layout/fragment_my.xml
@@ -0,0 +1,7 @@
+
+
+
+
\ No newline at end of file