-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
208 changed files
with
2,259 additions
and
6,013 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,129 +1,127 @@ | ||
def localProperties = new Properties() | ||
def localPropertiesFile = rootProject.file('local.properties') | ||
if (localPropertiesFile.exists()) { | ||
localPropertiesFile.withReader('UTF-8') { reader -> | ||
localProperties.load(reader) | ||
} | ||
} | ||
|
||
def flutterRoot = localProperties.getProperty('flutter.sdk') | ||
if (flutterRoot == null) { | ||
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") | ||
} | ||
|
||
def flutterVersionCode = localProperties.getProperty('flutter.versionCode') | ||
if (flutterVersionCode == null) { | ||
flutterVersionCode = '1' | ||
} | ||
|
||
def flutterVersionName = localProperties.getProperty('flutter.versionName') | ||
if (flutterVersionName == null) { | ||
flutterVersionName = '1.0' | ||
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 keystoreProperties = new Properties() | ||
def keystorePropertiesFile = rootProject.file('key.properties') | ||
if (keystorePropertiesFile.exists()) { | ||
keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) | ||
} | ||
|
||
apply plugin: 'com.android.application' | ||
apply plugin: 'kotlin-android' | ||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" | ||
subprojects { | ||
afterEvaluate { project -> | ||
if (project.hasProperty('android')) { | ||
project.android { | ||
if (namespace == null) { | ||
namespace = project.group.toString() // Set namespace as fallback | ||
} | ||
project.tasks.whenTaskAdded { task -> | ||
if (task.name.contains('processDebugManifest') || task.name.contains('processReleaseManifest')) { | ||
task.doFirst { | ||
File manifestFile = file("${projectDir}/src/main/AndroidManifest.xml") | ||
if (manifestFile.exists()) { | ||
String manifestContent = manifestFile.text | ||
if (manifestContent.contains('package=')) { | ||
manifestContent = manifestContent.replaceAll(/package="[^"]*"/, "") | ||
manifestFile.write(manifestContent) | ||
println "Removed 'package' attribute from ${manifestFile}" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) { | ||
kotlinOptions { | ||
jvmTarget = JavaVersion.VERSION_1_8.toString() | ||
} | ||
} | ||
} | ||
} | ||
|
||
android { | ||
compileSdkVersion 34 | ||
|
||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
namespace = "co.altme.alt.me.altme" | ||
compileSdk = flutter.compileSdkVersion | ||
ndkVersion = flutter.ndkVersion | ||
|
||
packagingOptions { | ||
pickFirst 'lib/x86/libsodium.so' | ||
pickFirst 'lib/x86_64/libsodium.so' | ||
pickFirst 'lib/armeabi-v7a/libsodium.so' | ||
pickFirst 'lib/arm64-v8a/libsodium.so' | ||
pickFirst 'lib/x86/libsodium.so' | ||
pickFirst 'lib/x86_64/libsodium.so' | ||
pickFirst 'lib/armeabi-v7a/libsodium.so' | ||
pickFirst 'lib/arm64-v8a/libsodium.so' | ||
} | ||
kotlinOptions { | ||
jvmTarget = '1.8' | ||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} | ||
|
||
sourceSets { | ||
main.java.srcDirs += 'src/main/kotlin' | ||
kotlinOptions { | ||
jvmTarget = JavaVersion.VERSION_1_8.toString() | ||
} | ||
|
||
defaultConfig { | ||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). | ||
applicationId "co.talao.wallet" | ||
minSdkVersion 23 | ||
multiDexEnabled true | ||
targetSdkVersion flutter.targetSdkVersion | ||
versionCode flutterVersionCode.toInteger() | ||
versionName flutterVersionName | ||
applicationId = "co.talao.wallet" | ||
// You can update the following values to match your application needs. | ||
// For more information, see: https://flutter.dev/to/review-gradle-config. | ||
minSdk = flutter.minSdkVersion | ||
targetSdk = flutter.targetSdkVersion | ||
versionCode = flutter.versionCode | ||
versionName = flutter.versionName | ||
} | ||
|
||
// TODO: Remove when below fix is available in stable channel. | ||
// https://github.com/flutter/flutter/pull/82309 | ||
lintOptions { | ||
checkReleaseBuilds false | ||
} | ||
|
||
|
||
signingConfigs { | ||
if (System.getenv("ANDROID_KEYSTORE_PATH")) { | ||
release { | ||
storeFile file(System.getenv("ANDROID_KEYSTORE_PATH")) | ||
keyAlias System.getenv("ANDROID_KEYSTORE_ALIAS") | ||
keyPassword System.getenv("ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD") | ||
storePassword System.getenv("ANDROID_KEYSTORE_PASSWORD") | ||
storeFile = file(System.getenv("ANDROID_KEYSTORE_PATH")) | ||
keyAlias = System.getenv("ANDROID_KEYSTORE_ALIAS") | ||
keyPassword = System.getenv("ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD") | ||
storePassword = System.getenv("ANDROID_KEYSTORE_PASSWORD") | ||
} | ||
} else { | ||
release { | ||
keyAlias keystoreProperties['keyAlias'] | ||
keyPassword keystoreProperties['keyPassword'] | ||
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null | ||
storePassword keystoreProperties['storePassword'] | ||
keyAlias = keystoreProperties['keyAlias'] | ||
keyPassword = keystoreProperties['keyPassword'] | ||
storeFile = keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null | ||
storePassword = keystoreProperties['storePassword'] | ||
} | ||
} | ||
} | ||
|
||
flavorDimensions "default" | ||
flavorDimensions = ["default"] | ||
productFlavors { | ||
production { | ||
dimension "default" | ||
applicationIdSuffix "" | ||
dimension = "default" | ||
applicationIdSuffix = "" | ||
manifestPlaceholders = [appName: "Talao"] | ||
} | ||
staging { | ||
dimension "default" | ||
applicationIdSuffix ".stg" | ||
dimension = "default" | ||
applicationIdSuffix = ".stg" | ||
manifestPlaceholders = [appName: "[STG] Talao"] | ||
} | ||
development { | ||
dimension "default" | ||
applicationIdSuffix ".dev" | ||
dimension = "default" | ||
applicationIdSuffix = ".dev" | ||
manifestPlaceholders = [appName: "[DEV] Talao"] | ||
} | ||
} | ||
|
||
buildTypes { | ||
release { | ||
signingConfig signingConfigs.release | ||
minifyEnabled true | ||
signingConfig = signingConfigs.release | ||
minifyEnabled = true | ||
} | ||
debug { | ||
signingConfig signingConfigs.debug | ||
signingConfig = signingConfigs.debug | ||
} | ||
} | ||
} | ||
|
||
flutter { | ||
source '../..' | ||
source = "../.." | ||
} | ||
|
||
dependencies { | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" | ||
def lifecycle_version = "2.5.1" | ||
implementation "androidx.lifecycle:lifecycle-viewmodel:$lifecycle_version" | ||
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
org.gradle.jvmargs=-Xmx2048M | ||
org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError | ||
android.useAndroidX=true | ||
android.enableJetifier=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,25 @@ | ||
include ':app' | ||
pluginManagement { | ||
def flutterSdkPath = { | ||
def properties = new Properties() | ||
file("local.properties").withInputStream { properties.load(it) } | ||
def flutterSdkPath = properties.getProperty("flutter.sdk") | ||
assert flutterSdkPath != null, "flutter.sdk not set in local.properties" | ||
return flutterSdkPath | ||
}() | ||
|
||
def localPropertiesFile = new File(rootProject.projectDir, "local.properties") | ||
def properties = new Properties() | ||
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") | ||
|
||
assert localPropertiesFile.exists() | ||
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } | ||
repositories { | ||
google() | ||
mavenCentral() | ||
gradlePluginPortal() | ||
} | ||
} | ||
|
||
def flutterSdkPath = properties.getProperty("flutter.sdk") | ||
assert flutterSdkPath != null, "flutter.sdk not set in local.properties" | ||
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" | ||
plugins { | ||
id "dev.flutter.flutter-plugin-loader" version "1.0.0" | ||
id "com.android.application" version "8.1.0" apply false | ||
id "org.jetbrains.kotlin.android" version "1.8.22" apply false | ||
} | ||
|
||
include ":app" |
Oops, something went wrong.