Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/3063/remove-wallet' into 3063/re…
Browse files Browse the repository at this point in the history
…move-wallet
  • Loading branch information
ppupha committed Dec 4, 2024
2 parents 2586662 + ab529db commit 99e3bee
Show file tree
Hide file tree
Showing 92 changed files with 2,148 additions and 297 deletions.
249 changes: 190 additions & 59 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,26 @@
buildscript {
repositories {
// ...
maven { url 'https://plugins.gradle.org/m2/' } // Gradle Plugin Portal
google() // Google's Maven repository
}
ext.kotlin_version = '1.9.0'
dependencies {
// ...
// OneSignal-Gradle-Plugin
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.10, 0.99.99]'
classpath 'com.google.gms:google-services:4.3.14'
}
}

plugins {
id "com.android.application"
id "kotlin-android"
id "kotlinx-serialization"
id "com.google.gms.google-services"
id "dev.flutter.flutter-gradle-plugin"
id 'kotlin-kapt'
id 'kotlin-parcelize'
}

def localProperties = new Properties()
Expand All @@ -12,97 +31,162 @@ if (localPropertiesFile.exists()) {
}
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
def environment = System.getenv()

def flutterVersionCode = environment["FLUTTER_VERSION_CODE"]

if (flutterVersionCode == null) {
flutterVersionCode = localProperties.getProperty('flutter.versionCode')
}

if (flutterVersionCode == null) {
flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
def flutterVersionName = environment["FLUTTER_VERSION_NAME"]

if (flutterVersionName == null) {
flutterVersionName = localProperties.getProperty('flutter.versionName')
}

if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
def branchKey = localProperties["branch.key"] ?: environment["BRANCH_KEY"]
if (branchKey == null) {
throw new GradleException("Branch key not found.")
}

android {
namespace "com.bitmark.autonomywallet"
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion
def branchKeyTest = localProperties["branch.keyTest"] ?: environment["BRANCH_KEY_TEST"]
if (branchKeyTest == null) {
throw new GradleException("Branch test key not found.")
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
def branchTestMode = localProperties["branch.testMode"] ?: environment["BRANCH_IS_TEST"] ?: false

kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}
def signature_hash = localProperties["signature.hash"] ?: environment["SIGNATURE_HASH"]

def signature_hash_inhouse = localProperties["signature.hashInhouse"] ?: environment["SIGNATURE_HASH_INHOUSE"]

android {
compileSdkVersion 34
flavorDimensions 'env'

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
resConfigs 'en', 'US'
}

signingConfigs {
release {
def releaseProperties = new Properties()
def releasePropertiesFile = rootProject.file('release.properties')
if (releasePropertiesFile.exists()) {
releasePropertiesFile.withReader('UTF-8') { reader ->
releaseProperties.load(reader)
}
}

keyAlias releaseProperties['key.alias']
keyPassword releaseProperties['key.alias.password']
storePassword releaseProperties['key.store.password']
storeFile rootProject.file('release.keystore')
// Update this with the path to your keystore
}
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.bitmark.autonomywallet"
// 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.
minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion
applicationId "com.bitmark.autonomy_client"
minSdkVersion 29
targetSdkVersion 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName

manifestPlaceholders = [
branchKey : branchKey,
branchKeyTest : branchKeyTest,
branchTestMode: branchTestMode
]
}

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")
}
} else {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
buildFeatures {
compose true
}

composeOptions {
kotlinCompilerExtensionVersion = "1.5.2"
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = "17"
}

buildTypes {
release {
if (rootProject.file('release.keystore').exists()) {
signingConfig signingConfigs.release
} else {
signingConfig signingConfigs.debug
}
minifyEnabled true
shrinkResources true

proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

}
}

flavorDimensions "default"
productFlavors {
productFlavors {
dev {
dimension "env"
applicationIdSuffix ".inhouse"
resValue "string", "app_name", "Feral File (Dev)"
manifestPlaceholders = [
appIcon : "@mipmap/ic_launcher_dev",
appIconRound: "@mipmap/ic_launcher_dev_round"
]
buildConfigField "boolean", "ENABLE_DEBUGGER_DETECTION", "false"
buildConfigField "String", "SIGNATURE_HASH", '\"' + signature_hash_inhouse + '\"'
}

production {
dimension "default"
applicationIdSuffix ""
manifestPlaceholders = [appName: "Feralfile App"]
dimension "env"
resValue "string", "app_name", "Feral File"
manifestPlaceholders = [
appIcon : "@mipmap/ic_launcher",
appIconRound: "@mipmap/ic_launcher_round"
]
buildConfigField "boolean", "ENABLE_DEBUGGER_DETECTION", "true"
// SIGNATURE_HASH with value from local.properties

buildConfigField "String", "SIGNATURE_HASH", '\"' + signature_hash + '\"'
}
staging {
dimension "default"
applicationIdSuffix ".stg"
manifestPlaceholders = [appName: "[STG] Feralfile App"]
}
packagingOptions {
jniLibs {
excludes += ['META-INF/*']
pickFirsts += ['**/*.so']
}
development {
dimension "default"
applicationIdSuffix ".dev"
manifestPlaceholders = [appName: "[DEV] Feralfile App"]
resources {
excludes += ['META-INF/*', '**/lib/libsodiumjni.dylib']
}
}

buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt')
}
debug {
signingConfig signingConfigs.debug
}
namespace 'com.bitmark.autonomy_flutter'
lint {
checkReleaseBuilds false
}
buildFeatures {
viewBinding true
}
}

Expand All @@ -111,5 +195,52 @@ flutter {
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.20"
implementation 'com.google.firebase:protolite-well-known-types:18.0.0'
def lifecycle_version = "2.6.0-alpha03"
def beacon_version = "c2434dcc73"

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.1")
implementation 'com.google.android.gms:play-services-auth-blockstore:16.2.0'
implementation 'io.reactivex.rxjava2:rxjava:2.2.10'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
implementation('com.github.bitmark-inc:libauk-kotlin:ad2d4519bd') {
exclude group: 'com.google.protobuf'
exclude module: 'jetified-protobuf-java'
}
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'com.google.android.material:material:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'

implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation("androidx.lifecycle:lifecycle-process:$lifecycle_version")
implementation("com.google.code.gson:gson:2.9.1")
implementation("com.android.installreferrer:installreferrer:2.2")
implementation("com.google.android.gms:play-services-ads-identifier:18.0.1")
implementation(platform("com.walletconnect:android-bom:1.12.0"))
implementation("com.walletconnect:android-core:1.17.0")
implementation("com.walletconnect:sign:2.15.0")
implementation("com.scottyab:rootbeer-lib:0.1.0")

implementation("com.github.autonomy-system:beacon-android-sdk:$beacon_version") {
exclude group: 'com.goterl'
exclude module: 'lazysodium-android'
exclude group: 'net.java.dev.jna'
exclude module: 'jna'
exclude group: 'com.google.protobuf'
exclude module: 'jetified-protobuf-java'
}

implementation 'com.github.bumptech.glide:glide:4.12.0'
// kapt 'com.github.bumptech.glide:compiler:4.12.0'
implementation 'androidx.glance:glance-appwidget:LATEST-VERSION'
}

configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'androidx.work') {
details.useVersion '2.8.1'
}
}
}
69 changes: 69 additions & 0 deletions android/app/google-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"project_info": {
"project_number": "1049339402213",
"firebase_url": "https://bitmark-autonomy.firebaseio.com",
"project_id": "bitmark-autonomy",
"storage_bucket": "bitmark-autonomy.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:1049339402213:android:7265dc65bcc4e82715c10c",
"android_client_info": {
"package_name": "com.bitmark.autonomy_client"
}
},
"oauth_client": [
{
"client_id": "1049339402213-4p8ded0ahoujss4hq73mlk46d4kmg3vo.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyD9pZXBE637fqM-Qz8mxhqMGpaWyENrm2w"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "1049339402213-4p8ded0ahoujss4hq73mlk46d4kmg3vo.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:1049339402213:android:ac2e79b3a7b8853215c10c",
"android_client_info": {
"package_name": "com.bitmark.autonomy_client.inhouse"
}
},
"oauth_client": [
{
"client_id": "1049339402213-4p8ded0ahoujss4hq73mlk46d4kmg3vo.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyD9pZXBE637fqM-Qz8mxhqMGpaWyENrm2w"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "1049339402213-4p8ded0ahoujss4hq73mlk46d4kmg3vo.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}
Loading

0 comments on commit 99e3bee

Please sign in to comment.