Skip to content

Commit

Permalink
pigeon
Browse files Browse the repository at this point in the history
  • Loading branch information
jing332 committed Jan 14, 2024
1 parent 67d3227 commit bb1db04
Show file tree
Hide file tree
Showing 17 changed files with 1,052 additions and 192 deletions.
1 change: 1 addition & 0 deletions alist_version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v3.30.0
40 changes: 24 additions & 16 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,35 @@ plugins {
id "dev.flutter.flutter-gradle-plugin"
}

def localProperties = new Properties()
def pro = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
pro.load(reader)
}
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
static def releaseTime() {
return new Date().format("yy.MMddHH", TimeZone.getTimeZone("GMT+8"))
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
def version = "1." + releaseTime()
def gitCommits = Integer.parseInt('git rev-list HEAD --count'.execute().text.trim())

def alistVersion = rootProject.file("../alist_version").readLines()[0]

android {
namespace "com.github.jing332.alistflutter"
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion



sourceSets {
main.java.srcDirs += 'src/main/kotlin'
signingConfigs {
release {
storeFile file(pro["KEY_PATH"])
storePassword pro["KEY_PASSWORD"]
keyAlias pro["ALIAS_NAME"]
keyPassword pro["ALIAS_PASSWORD"]
}
}

defaultConfig {
Expand All @@ -43,8 +44,15 @@ android {
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
versionCode gitCommits
versionName version

buildConfigField("String", "ALIST_VERSION", "\"${alistVersion}\"")
}


buildFeatures {
buildConfig true
}


Expand Down Expand Up @@ -73,7 +81,7 @@ android {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
signingConfig signingConfigs.release
}

debug {
Expand Down
Loading

0 comments on commit bb1db04

Please sign in to comment.