Updated on 2026-08-14
This commit is contained in:
commit
c0fe23fe31
10 changed files with 106 additions and 42 deletions
|
|
@ -2,6 +2,7 @@ apply plugin: 'com.android.application'
|
|||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
apply plugin: 'kotlin-kapt'
|
||||
apply plugin: 'io.fabric'
|
||||
|
||||
static def generateVersionName() {
|
||||
def gitCommitsCount = "git rev-list HEAD --count".execute().text.trim()
|
||||
|
|
@ -9,6 +10,9 @@ static def generateVersionName() {
|
|||
return gitCommitsCount.toInteger() + 831// + "\\n" + gitCurrentBranch
|
||||
}
|
||||
|
||||
Properties properties = new Properties()
|
||||
properties.load(project.rootProject.file('local.properties').newDataInputStream())
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
defaultConfig {
|
||||
|
|
@ -25,18 +29,29 @@ android {
|
|||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
signingConfig signingConfigs.debug
|
||||
buildConfigField 'boolean', 'CRASHLYTICS', 'Boolean.parseBoolean("false")'
|
||||
ext.enableCrashlytics = false
|
||||
}
|
||||
debug {
|
||||
debuggable true
|
||||
minifyEnabled false
|
||||
applicationIdSuffix ".debug"
|
||||
signingConfig signingConfigs.debug
|
||||
buildConfigField 'boolean', 'CRASHLYTICS', 'Boolean.parseBoolean("false")'
|
||||
ext.enableCrashlytics = false
|
||||
}
|
||||
debug_beta {
|
||||
initWith debug
|
||||
versionNameSuffix "-beta"
|
||||
applicationIdSuffix ".debug_beta"
|
||||
buildConfigField 'boolean', 'CRASHLYTICS', 'Boolean.parseBoolean("true")'
|
||||
manifestPlaceholders = [fabric_api_key: properties.getProperty('fabric_api_key')]
|
||||
}
|
||||
}
|
||||
flavorDimensions ""
|
||||
productFlavors {
|
||||
tangemAccess {
|
||||
versionCode 114
|
||||
versionCode 115
|
||||
versionName "0.908.1." + generateVersionName()
|
||||
applicationId "com.tangem.wallet"
|
||||
signingConfig signingConfigs.debug
|
||||
|
|
@ -65,6 +80,7 @@ android {
|
|||
|
||||
repositories {
|
||||
maven { url "https://jitpack.io" }
|
||||
maven { url 'https://maven.fabric.io/public' }
|
||||
}
|
||||
configurations {
|
||||
all*.exclude group: 'com.google.guava', module: 'listenablefuture'
|
||||
|
|
@ -119,6 +135,9 @@ dependencies {
|
|||
// implementation 'com.github.stellar:java-stellar-sdk:0.4.1'
|
||||
implementation 'net.i2p.crypto:eddsa:0.3.0'
|
||||
|
||||
implementation('com.crashlytics.sdk.android:crashlytics:2.9.9') { transitive = true }
|
||||
implementation('io.fabric.sdk.android:fabric:1.4.0@aar') { transitive = true }
|
||||
|
||||
implementation files('libs/ripple-core-0.0.1.jar')
|
||||
//4 dependencies for ripple-core TODO: move to module?
|
||||
implementation 'net.i2p.crypto:eddsa:0.3.0'
|
||||
|
|
|
|||
|
|
@ -2,5 +2,6 @@
|
|||
<resources>
|
||||
|
||||
<string name="app_name">DEBUG</string>
|
||||
<string name="log_file_provider_authorities">com.tangem.debug.data.LogFileProvider</string>
|
||||
|
||||
</resources>
|
||||
23
app/src/debug_beta/AndroidManifest.xml
Normal file
23
app/src/debug_beta/AndroidManifest.xml
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.tangem.wallet">
|
||||
|
||||
|
||||
<application
|
||||
tools:ignore="GoogleAppIndexingWarning">
|
||||
|
||||
<meta-data
|
||||
android:name="io.fabric.ApiKey"
|
||||
android:value="${fabric_api_key}" />
|
||||
|
||||
<provider
|
||||
android:name="com.tangem.data.LogFileProvider"
|
||||
android:authorities="@string/log_file_provider_authorities"
|
||||
android:enabled="true"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true" />
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
6
app/src/debug_beta/res/values/strings.xml
Normal file
6
app/src/debug_beta/res/values/strings.xml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<string name="app_name">TangemBeta</string>
|
||||
|
||||
</resources>
|
||||
|
|
@ -2,16 +2,18 @@ package com.tangem
|
|||
|
||||
import android.app.Application
|
||||
import androidx.appcompat.app.AppCompatDelegate
|
||||
import com.crashlytics.android.Crashlytics
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.reflect.TypeToken
|
||||
import com.tangem.data.local.PendingTransactionsStorage
|
||||
import com.tangem.card_android.android.data.Firmwares
|
||||
import com.tangem.card_android.android.data.PINStorage
|
||||
import com.tangem.card_common.data.Issuer
|
||||
import com.tangem.data.dp.PrefsManager
|
||||
import com.tangem.data.local.PendingTransactionsStorage
|
||||
import com.tangem.di.*
|
||||
import com.tangem.server_android.data.LocalStorage
|
||||
import com.tangem.wallet.BuildConfig
|
||||
import io.fabric.sdk.android.Fabric
|
||||
import java.io.InputStreamReader
|
||||
import java.nio.charset.StandardCharsets
|
||||
|
||||
|
|
@ -73,6 +75,7 @@ class App : Application() {
|
|||
}
|
||||
}
|
||||
)
|
||||
if (BuildConfig.CRASHLYTICS) Fabric.with(this, Crashlytics())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,11 +3,13 @@ buildscript {
|
|||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
maven { url 'https://maven.fabric.io/public' }
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.4.2'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
|
||||
classpath 'io.fabric.tools:gradle:1.27.1'
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,10 @@ android {
|
|||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
debug_beta {
|
||||
initWith debug
|
||||
versionNameSuffix "-beta"
|
||||
}
|
||||
}
|
||||
buildToolsVersion '28.0.3'
|
||||
|
||||
|
|
|
|||
|
|
@ -16,46 +16,53 @@
|
|||
default_platform(:android)
|
||||
|
||||
platform :android do
|
||||
|
||||
desc "Runs all the tests"
|
||||
lane :test do
|
||||
gradle(
|
||||
task: "test",
|
||||
flavor: "tangemAccess",
|
||||
build_type: "Debug")
|
||||
task: "test",
|
||||
flavor: "tangemAccess",
|
||||
build_type: "DebugUnitTest")
|
||||
end
|
||||
|
||||
desc "Build a release APK"
|
||||
lane :release do
|
||||
gradle(
|
||||
task: "clean assemble",
|
||||
flavor: "tangemAccess",
|
||||
build_type: "Release")
|
||||
desc "Build a signed release APK"
|
||||
lane :release do |options|
|
||||
gradle(
|
||||
task: "clean assemble",
|
||||
flavor: "tangemAccess",
|
||||
build_type: "Release",
|
||||
properties: {
|
||||
"android.injected.signing.store.file" => options[:keystore],
|
||||
"android.injected.signing.store.password" => options[:store_password],
|
||||
"android.injected.signing.key.alias" => options[:key_alias],
|
||||
"android.injected.signing.key.password" => options[:key_password],
|
||||
})
|
||||
end
|
||||
|
||||
desc "Build a debug APK"
|
||||
lane :debug do
|
||||
gradle(task: "clean assemble",
|
||||
flavor: "tangemAccess",
|
||||
build_type: "Debug")
|
||||
end
|
||||
desc "Build debug and release APKs"
|
||||
lane :build do |options|
|
||||
gradle(
|
||||
task: "clean assemble",
|
||||
flavor: "tangemAccess",
|
||||
build_type: "Debug_beta")
|
||||
gradle(
|
||||
task: "assemble",
|
||||
flavor: "tangemAccess",
|
||||
build_type: "Release",
|
||||
properties: {
|
||||
"android.injected.signing.store.file" => options[:keystore],
|
||||
"android.injected.signing.store.password" => options[:store_password],
|
||||
"android.injected.signing.key.alias" => options[:key_alias],
|
||||
"android.injected.signing.key.password" => options[:key_password],
|
||||
})
|
||||
end
|
||||
|
||||
desc "Submit a new Beta Build to Crashlytics Beta"
|
||||
lane :beta do
|
||||
gradle(task: "clean assemble",
|
||||
flavor: "tangemAccess",
|
||||
build_type: "Debug")
|
||||
crashlytics
|
||||
|
||||
# sh "your_script.sh"
|
||||
# You can also use other beta testing services here
|
||||
lane :beta do |options|
|
||||
crashlytics(
|
||||
api_token: options[:api_token],
|
||||
build_secret: options[:build_secret],
|
||||
apk_path: options[:apk_path])
|
||||
end
|
||||
|
||||
desc "Deploy a new version to the Google Play"
|
||||
lane :deploy do
|
||||
gradle(
|
||||
task: "clean assemble",
|
||||
flavor: "tangemAccess",
|
||||
build_type: "Release")
|
||||
upload_to_play_store
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -25,22 +25,17 @@ Runs all the tests
|
|||
```
|
||||
fastlane android release
|
||||
```
|
||||
Build a release APK
|
||||
### android debug
|
||||
Build a signed release APK
|
||||
### android build
|
||||
```
|
||||
fastlane android debug
|
||||
fastlane android build
|
||||
```
|
||||
Build a debug APK
|
||||
Build debug and release APKs
|
||||
### android beta
|
||||
```
|
||||
fastlane android beta
|
||||
```
|
||||
Submit a new Beta Build to Crashlytics Beta
|
||||
### android deploy
|
||||
```
|
||||
fastlane android deploy
|
||||
```
|
||||
Deploy a new version to the Google Play
|
||||
|
||||
----
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,10 @@ android {
|
|||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
debug_beta {
|
||||
initWith debug
|
||||
versionNameSuffix "-beta"
|
||||
}
|
||||
}
|
||||
productFlavors {
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue