mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 15:57:25 +00:00

* Refactor import function & Allow import local comics without copying them to local path. * android: use file_picker instead, support directory access for android 10 * Improve import logic * Fix sql query. * Add ability to remove invalid favorite items. * Perform sort before choosing cover * Revert changes of "use file_picker instead". * Try catch on "check update" * Added module 'flutter_saf' * gitignore * remove unsupported arch in build.gradle * Use flutter_saf to handle android's directory and files, improve import logic. * revert changes of 'requestLegacyExternalStorage' * fix cbz import * openDirectoryPlatform * Remove double check on source folder * use openFilePlatform * remove unused import * improve local comic's path handling * bump version * fix pubspec format * return null when comic folder is empty
105 lines
3.3 KiB
Groovy
105 lines
3.3 KiB
Groovy
plugins {
|
|
id "com.android.application"
|
|
id "kotlin-android"
|
|
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
|
|
id "dev.flutter.flutter-gradle-plugin"
|
|
}
|
|
|
|
def localProperties = new Properties()
|
|
def localPropertiesFile = rootProject.file("local.properties")
|
|
if (localPropertiesFile.exists()) {
|
|
localPropertiesFile.withReader("UTF-8") { reader ->
|
|
localProperties.load(reader)
|
|
}
|
|
}
|
|
|
|
def flutterVersionCode = localProperties.getProperty("flutter.versionCode")
|
|
if (flutterVersionCode == null) {
|
|
flutterVersionCode = "1"
|
|
}
|
|
|
|
def flutterVersionName = localProperties.getProperty("flutter.versionName")
|
|
if (flutterVersionName == null) {
|
|
flutterVersionName = "1.0"
|
|
}
|
|
|
|
def keystorePropertiesFile = rootProject.file("key.properties")
|
|
def keystoreProperties = new Properties()
|
|
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
|
|
|
android {
|
|
namespace = "com.github.wgh136.venera"
|
|
compileSdk = flutter.compileSdkVersion
|
|
ndkVersion "25.1.8937393"
|
|
|
|
splits{
|
|
abi {
|
|
reset()
|
|
include 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
|
enable true
|
|
universalApk true
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
kotlinOptions{
|
|
jvmTarget = JavaVersion.VERSION_17
|
|
}
|
|
|
|
signingConfigs {
|
|
debug {
|
|
storeFile file(keystoreProperties['storeFile'])
|
|
storePassword keystoreProperties['storePassword']
|
|
keyAlias keystoreProperties['keyAlias']
|
|
keyPassword keystoreProperties['keyPassword']
|
|
}
|
|
release {
|
|
keyAlias keystoreProperties['keyAlias']
|
|
keyPassword keystoreProperties['keyPassword']
|
|
storeFile file(keystoreProperties['storeFile'])
|
|
storePassword keystoreProperties['storePassword']
|
|
}
|
|
}
|
|
|
|
defaultConfig {
|
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
|
applicationId = "com.github.wgh136.venera"
|
|
// You can update the following values to match your application needs.
|
|
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
|
minSdk = flutter.minSdkVersion
|
|
targetSdk = flutter.targetSdkVersion
|
|
versionCode = flutterVersionCode.toInteger()
|
|
versionName = flutterVersionName
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
ndk {
|
|
abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
|
|
}
|
|
signingConfig signingConfigs.release
|
|
applicationVariants.all { variant ->
|
|
variant.outputs.all { output ->
|
|
def abi = output.getFilter(com.android.build.OutputFile.ABI)
|
|
if (abi != null) {
|
|
outputFileName = "venera-${variant.versionName}-${abi}.apk"
|
|
} else {
|
|
outputFileName = "venera-${variant.versionName}.apk"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
flutter {
|
|
source = "../.."
|
|
}
|
|
|
|
dependencies {
|
|
implementation "androidx.activity:activity-ktx:1.9.2"
|
|
implementation 'androidx.documentfile:documentfile:1.0.1'
|
|
} |