Crashlytics mapping file upload fails on Android Studio with minifyEnabled - android

When activating proguard (minifyEnabled = true) in my gradle configuration, the build fails in the step:
:app:uploadCrashlyticsMappingFileRelease
the returned error is: java.io.IOException: Crashlytics could not read proxy port string
With minifyEnabled = false the app builds and runs correctly.
My gradle file (app)
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-parcelize'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.google.firebase.appdistribution'
apply plugin: 'io.objectbox'
apply plugin: 'realm-android'
apply plugin: "androidx.navigation.safeargs"
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
android {
compileSdkVersion 32
defaultConfig {
applicationId project.getProperties().get('application_id')
minSdkVersion 23
targetSdkVersion 32
versionCode Integer.parseInt(project.getProperties().get('version_code'))
versionName project.getProperties().get('version_name')
vectorDrawables.useSupportLibrary = true
resValue 'string', 'application_name', project.getProperties().get('application_name')
resValue 'string', 'application_id', project.getProperties().get('application_id')
multiDexEnabled true
}
signingConfigs {
release {
storeFile file('../' + project.getProperties().get('store_file'))
storePassword project.getProperties().get('store_password')
keyAlias project.getProperties().get('key_alias')
keyPassword project.getProperties().get('key_password')
}
}
buildTypes {
debug {
debuggable true
minifyEnabled false
signingConfig signingConfigs.release
}
release {
debuggable true
minifyEnabled true
shrinkResources false
signingConfig signingConfigs.release
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
firebaseAppDistribution {
releaseNotes = generateChangeLogShort()
testers = "john.doe#gmail.com"
}
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildFeatures {
viewBinding true
}
kotlinOptions {
jvmTarget = '1.8'
freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
}
}
dependencies {
// Kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
// KTX
implementation 'androidx.core:core-ktx:1.8.0'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.appcompat:appcompat:1.4.2'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
// Needed for https://github.com/FirebaseExtended/flutterfire/issues/4651
implementation 'androidx.browser:browser:1.4.0'
// Firebase bug workaround for emulator, as described here: https://stackoverflow.com/questions/64668851/why-the-firestore-isnt-working-on-android-studio
implementation "io.grpc:grpc-okhttp:1.44.1"
// Import the BoM for the Firebase platform
implementation platform('com.google.firebase:firebase-bom:30.1.0')
// Declare the dependencies for the Crashlytics and Analytics libraries
// When using the BoM, you don't specify versions in Firebase library dependencies
implementation 'com.google.firebase:firebase-crashlytics'
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.firebase:firebase-messaging'
implementation 'com.google.firebase:firebase-functions'
implementation 'com.google.firebase:firebase-firestore'
implementation 'com.google.firebase:firebase-storage'
implementation 'com.google.firebase:firebase-core'
implementation 'com.google.firebase:firebase-auth'
implementation 'com.firebaseui:firebase-ui-storage:6.2.1'
implementation 'com.google.code.gson:gson:2.8.9'
implementation 'com.google.android:flexbox:1.1.1'
implementation 'com.google.android.gms:play-services-maps:18.0.2'
implementation 'com.google.maps.android:android-maps-utils:0.6.2'
implementation 'com.google.android.gms:play-services-places:17.0.0'
implementation 'com.google.android.gms:play-services-location:20.0.0'
implementation 'com.kbeanie:multipicker:1.5#aar'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
implementation 'org.greenrobot:eventbus:3.2.0'
implementation 'io.michaelrocks:libphonenumber-android:8.10.7'
implementation 'androidx.dynamicanimation:dynamicanimation:1.0.0'
implementation 'com.afollestad.material-dialogs:core:0.9.6.0'
implementation 'com.afollestad.material-dialogs:commons:0.9.6.0'
implementation 'com.google.android.material:material:1.6.1'
implementation 'com.github.bumptech.glide:glide:4.12.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.8.1'
implementation 'com.squareup.okhttp3:okhttp:4.9.0'
implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation 'com.google.firebase:firebase-config:21.1.0'
// Navigation:
def nav_version = "2.5.0"
// Kotlin
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
// Feature module Support
implementation "androidx.navigation:navigation-dynamic-features-fragment:$nav_version"
// Testing Navigation
androidTestImplementation "androidx.navigation:navigation-testing:$nav_version"
// Places library
implementation 'com.google.android.libraries.places:places:2.6.0'
// PING Place Picker
implementation project(path: ':pingplacepicker')
//Wheel Picker
implementation 'com.super_rabbit.wheel_picker:NumberPicker:1.0.1'
kapt 'com.github.bumptech.glide:compiler:4.12.0'
}
def generateChangeLogShort(){
println "Generating release notes"
def releaseNotes = ""
def lastTagHash = "git rev-list --tags --skip=1 --max-count=1".execute().text.trim()
println lastTagHash
def lastTag = "git describe --abbrev=0 --tags $lastTagHash".execute().text.trim()
println lastTag
def cmdLine = "git log $lastTag..head --pretty=format:\"%s\""
def procCommit = cmdLine.execute()
procCommit.in.eachLine { line ->
//Remove surrounding quotation marks generated by the git log command
def escapedLine = line.substring(1, line.length() - 1)
//Escape backslashes
escapedLine = escapedLine.replaceAll(/(\\)/, "\\/")
//Escape quotation marks
escapedLine = escapedLine.replaceAll('"', '\\\\"')
//if (escapedLine.startsWith("feat:")) {
releaseNotes += escapedLine + "\n"
//}
}
println releaseNotes
return releaseNotes
}
gradle file (project):
buildscript {
ext {
kotlin_version = '1.6.21'
}
repositories {
mavenCentral()
google()
maven { url 'https://jitpack.io' }
jcenter()
}
dependencies {
def nav_version = '2.4.1'
classpath 'com.android.tools.build:gradle:7.2.1'
classpath 'com.google.gms:google-services:4.3.13'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.1'
classpath 'io.realm:realm-gradle-plugin:10.10.1'
classpath 'io.objectbox:objectbox-gradle-plugin:2.9.1'
classpath 'com.google.firebase:firebase-appdistribution-gradle:3.0.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version"
}
}
allprojects {
repositories {
mavenCentral()
google()
maven {
url 'https://maven.google.com/'
}
maven { url 'https://jitpack.io' }
jcenter()
}
}
repositories {
mavenCentral()
google()
maven { url 'https://jitpack.io' }
jcenter()
}
The error stack trace:
Caused by: java.io.IOException: Crashlytics could not read proxy port string.
at com.google.firebase.crashlytics.buildtools.api.net.proxy.DefaultProxyFactory.create(DefaultProxyFactory.java:38)
at com.google.firebase.crashlytics.buildtools.api.RestfulWebApi.sendFile(RestfulWebApi.java:91)
at com.google.firebase.crashlytics.buildtools.api.RestfulWebApi.uploadFile(RestfulWebApi.java:119)
at com.google.firebase.crashlytics.buildtools.api.FirebaseMappingFileService.uploadMappingFile(FirebaseMappingFileService.java:44)
at com.google.firebase.crashlytics.buildtools.Buildtools.uploadMappingFile(Buildtools.java:208)
at com.google.firebase.crashlytics.buildtools.Buildtools$uploadMappingFile$5.call(Unknown Source)
at com.google.firebase.crashlytics.buildtools.gradle.tasks.UploadMappingFileTask.uploadMappingFile(UploadMappingFileTask.groovy:63)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:104)
... 114 more
UPDATE:
Found out that issue is that the Crashlytics mapping file can't be uploaded because the proxy settings are not set in the Androdi Studio environment. But no proxy is being used, so have no idea what to specify for:
systemProp.https.proxyPort
systemProp.https.proxyHost

Related

How to properly implement MapBox SDK to Android Studio Project?

I am trying to implement MapBox SDK to my Android Application. I followed the official documentation but I am getting this error.
Unable to resolve dependency for
':app#debugUnitTest/compileClasspath': Could not resolve
com.mapbox.maps:android:10.6.1.
I have tried following the legacy documentation, but still no luck. I would like to ask if there are any other ways to implement the SDK or did I miss something. TYIA.
Here are my gradle scripts:
build.gradle (Project Level)
buildscript {
ext.kotlin_version = "1.5.31"
dependencies {
classpath 'com.google.gms:google-services:4.3.10'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
}
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins
{
id 'com.android.application' version '7.1.0' apply false
id 'com.android.library' version '7.1.0' apply false
id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin' version '2.0.1' apply false
}
allprojects {
final def var = repositories
{
google()
mavenCentral()
maven { url 'https://esri.jfrog.io/artifactory/arcgis' }
maven { url 'https://olympus.esri.com/artifactory/arcgisruntime-repo/' }
maven {
url 'https://api.mapbox.com/downloads/v2/releases/maven'
authentication {
basic(BasicAuthentication)
}
credentials {
// Do not change the username below.
// This should always be `mapbox` (not your username).
username = "mapbox"
// Use the secret token you stored in gradle.properties as the password
password = MAPBOX_DOWNLOADS_TOKEN
}
}
}
var
}
subprojects {
afterEvaluate { project ->
if (project.hasProperty("dependencies"))
{
dependencies {
implementation "androidx.appcompat:appcompat:1.4.1"
implementation "com.google.android.material:material:1.5.0"
implementation "com.esri.arcgisruntime:arcgis-android:$arcgisVersion"
implementation "androidx.multidex:multidex:2.0.1"
}
}
project.android {
defaultConfig {
multiDexEnabled true
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
}
}
}
}
task clean(type: Delete)
{
delete rootProject.buildDir
}
build.gradle (Module level)
plugins
{
id 'com.android.application'
id 'com.google.gms.google-services'
id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin'
id 'kotlin-android'
}
ext {
arcgisVersion = '100.13.0'
}
android
{
compileSdk 32
defaultConfig
{
applicationId "com.example.project1"
minSdk 26
targetSdk 32
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes
{
release
{
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions
{
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildFeatures
{
viewBinding true
}
}
dependencies
{
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'androidx.navigation:navigation-fragment:2.4.1'
implementation 'androidx.navigation:navigation-ui:2.4.1'
implementation 'com.android.volley:volley:1.2.1'
implementation 'com.google.firebase:firebase-messaging:21.1.0'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
implementation 'com.google.android.gms:play-services-auth:17.0.0'
implementation 'com.google.gms:google-services:3.0.0'
implementation "androidx.appcompat:appcompat"
implementation "com.google.android.material:material"
implementation "com.esri.arcgisruntime:arcgis-android"
implementation "androidx.multidex:multidex"
implementation 'com.google.android.libraries.places:places:2.6.0'
implementation 'com.mapbox.maps:android:10.6.1'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}
settings.gradle
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
}
rootProject.name = "proect1"
include ':app'

Runtime JAR files in the classpath should have the same version. These files were found in the classpath:

I have problem with pipeline test on branch and master although it used to pass on the master before.
Today i update Android Studio, this can this can cause errors?
I run on branch:
./gradlew assemble
i get error:
w: Runtime JAR files in the classpath should have the same version. These files were found in the classpath:
/Users/ddlugosz/.gradle/caches/transforms-3/d749d7039f211123753228b7812f7d3e/transformed/jetified-kotlin-stdlib-jdk8-1.5.10.jar (version 1.5)
/Users/ddlugosz/.gradle/caches/transforms-3/9e9187bd2896114f8594e23aebf1247b/transformed/jetified-kotlin-stdlib-jdk7-1.5.10.jar (version 1.5)
/Users/ddlugosz/.gradle/caches/transforms-3/96174d1705ef219692d873bf56dce082/transformed/jetified-kotlin-reflect-1.3.20.jar (version 1.3)
/Users/ddlugosz/.gradle/caches/transforms-3/4940e8dbd05acaea5533a602400cc173/transformed/jetified-kotlin-stdlib-1.5.10.jar (version 1.5)
/Users/ddlugosz/.gradle/caches/transforms-3/ed956f66efced3ce23396a82f4e6b7ee/transformed/jetified-kotlin-stdlib-common-1.5.10.jar (version 1.5)
w: Some runtime JAR files in the classpath have an incompatible version. Consider removing them from the classpath
e: java.lang.IllegalAccessError: class org.jetbrains.kotlin.kapt3.base.KaptContext (in unnamed module #0x44f86d99) cannot access class com.sun.tools.javac.util.Context (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.util to unnamed module #0x44f86d99
at org.jetbrains.kotlin.kapt3.base.KaptContext.<init>(KaptContext.kt:29)
at org.jetbrains.kotlin.kapt3.KaptContextForStubGeneration.<init>(KaptContextForStubGeneration.kt:40)
at org.jetbrains.kotlin.kapt3.AbstractKapt3Extension.contextForStubGeneration(Kapt3Extension.kt:285)
at org.jetbrains.kotlin.kapt3.AbstractKapt3Extension.analysisCompleted(Kapt3Extension.kt:169)
at org.jetbrains.kotlin.kapt3.ClasspathBasedKapt3Extension.analysisCompleted(Kapt3Extension.kt:100)
at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration$invokeExtensionsOnAnalysisComplete(TopDownAnalyzerFacadeForJVM.kt:111)
at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration(TopDownAnalyzerFacadeForJVM.kt:121)
at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration$default(TopDownAnalyzerFacadeForJVM.kt:85)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:514)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:505)
at org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport.analyzeAndReport(AnalyzerWithCompilerReport.kt:112)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.analyze(KotlinToJVMBytecodeCompiler.kt:505)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli(KotlinToJVMBytecodeCompiler.kt:189)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli$default(KotlinToJVMBytecodeCompiler.kt:155)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:169)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:52)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:88)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:44)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:98)
at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:386)
at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:110)
at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileIncrementally(IncrementalCompilerRunner.kt:303)
at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileImpl$rebuild(IncrementalCompilerRunner.kt:99)
at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileImpl(IncrementalCompilerRunner.kt:124)
at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compile(IncrementalCompilerRunner.kt:74)
at org.jetbrains.kotlin.daemon.CompileServiceImplBase.execIncrementalCompiler(CompileServiceImpl.kt:607)
at org.jetbrains.kotlin.daemon.CompileServiceImplBase.access$execIncrementalCompiler(CompileServiceImpl.kt:96)
at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1659)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:577)
at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:360)
at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200)
at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:712)
at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:598)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:844)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:721)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:720)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
I was looking for solution but not found
My kotlin version: 212-1.6.10-release-923-AS5457.46
My android studio version: Android Studio Chipmunk | 2021.2.1 Patch 1 AI-212.5712.43.2112.8609683 May 18, 2022
app/build.gradle
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-parcelize'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
repositories {
google()
mavenCentral()
maven {
url 'https://dl.bintray.com/kotlin/kotlin-dev/'
}
}
buildscript {
repositories {
google()
maven { url "https://jitpack.io" }
}
dependencies {
classpath 'com.google.gms:google-services:4.3.8'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.10"
}
}
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
compileSdkVersion 31
defaultConfig {
applicationId "xxxxxxxx"
minSdkVersion 21
targetSdkVersion 30
versionCode 80
versionName "2.1.11"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
checkReleaseBuilds false
}
packagingOptions {
exclude 'META-INF/*'
}
buildFeatures {
viewBinding true
}
}
configurations {
all {
exclude group: 'xpp3', module: 'xpp3'
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'androidx.activity:activity-ktx:1.3.0-beta02'
implementation 'androidx.fragment:fragment-ktx:1.3.5'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation "io.ktor:ktor-client-okhttp:$ktor_version"
implementation 'org.osmdroid:osmdroid-android:6.0.3'
implementation 'com.mikhaellopez:circularprogressbar:2.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.gms:play-services-location:18.0.0'
implementation 'com.google.firebase:firebase-messaging:20.1.0'
implementation 'com.google.firebase:firebase-messaging-ktx:23.0.6'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test:runner:1.3.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
// Room components
implementation 'androidx.room:room-runtime:2.4.2'
kapt 'androidx.room:room-compiler:2.4.2'
androidTestImplementation 'androidx.room:room-testing:2.4.2'
// Lifecycle components
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:adapter-java8:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.9.0'
implementation 'com.google.firebase:firebase-analytics:19.0.0'
implementation 'com.google.firebase:firebase-crashlytics:18.0.1'
implementation 'com.google.android.gms:play-services-auth:19.0.0'
implementation 'com.google.android.gms:play-services-auth-api-phone:17.5.1'
implementation 'androidx.multidex:multidex:2.0.1'
implementation "com.google.guava:guava:28.2-android"
}
project/build.gradle
allprojects {
buildscript {
ext.
ktor_version = '1.1.2'
repositories {
google()
mavenCentral()
maven {
url = uri("https://plugins.gradle.org/m2/")
}
maven { url 'https://maven.google.com' }
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.10'
classpath 'com.android.tools.build:gradle:7.1.0'
classpath "junit:junit:4.13.2"
classpath 'com.google.gms:google-services:4.3.12'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.0'
}
}
repositories {
mavenCentral()
maven {
url = uri("https://plugins.gradle.org/m2/")
}
google()
}
}
It resolve my problem:
I use Kotlin 1.6.10
but in project/gradle classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.10' was set on 1.5.10, i change this for 1.6.10
and add new dependecies
implementation "org.jetbrains.kotlin:kotlin-reflect:1.4.32"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.32"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.10"

android kotlin multiplatform kotlinx.serialization works on debug but does not work on release version

We are making our next project in the company with kotlin multiplatform. Everything worked fine until I tried to create a release version for android to beta test. I got this error in release versions while everything works fine in debug.
[NetworkManager] unknown exception: l.a.w: Can't locate argument-less serializer for class a. For generic classes, such as lists, please provide serializer explicitly.
here this is project level build.gradle
buildscript {
ext.kotlin_version = '1.3.70'
ext.versions = [
"ktor" : "1.3.2",
"serialization" : "0.20.0",
"coroutines" : "1.3.6",
]
repositories {
maven { url 'https://maven.google.com' }
maven { url 'https://dl.google.com/dl/android/maven2' }
maven { url "https://s3-eu-west-1.amazonaws.com/elasticode-sdk/Android/maven/" }
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.2.0'
classpath 'com.google.gms:google-services:4.3.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
plugins {
id 'org.jetbrains.kotlin.multiplatform' version '1.3.70' // or any other kotlin plugin
id 'org.jetbrains.kotlin.plugin.serialization' version '1.3.70'
}
allprojects {
repositories {
maven { url 'https://maven.google.com' }
maven { url "https://s3-eu-west-1.amazonaws.com/elasticode-sdk/Android/maven/" }
google()
jcenter()
}
}
and this is common modules build.gradle
apply plugin: 'kotlin-multiplatform'
apply plugin: 'kotlinx-serialization'
kotlin {
targets {
iosArm64("ios64")
iosX64("iosSim")
configure([
ios64,
iosSim
]) {
binaries.framework {
baseName = 'PassengerCommon'
}
}
fromPreset(presets.jvm, 'android')
}
sourceSets {
commonMain.dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime:${versions.serialization}"
implementation "io.ktor:ktor-client:${versions.ktor}"
implementation "io.ktor:ktor-client-json:${versions.ktor}"
implementation "io.ktor:ktor-client-serialization:${versions.ktor}"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core-common:${versions.coroutines}"
}
iosMain {
dependsOn commonMain
iosSimMain.dependsOn(it)
ios64Main.dependsOn(it)
dependencies {
// HTTP
implementation "io.ktor:ktor-client-ios:${versions.ktor}"
implementation "io.ktor:ktor-client-json-native:${versions.ktor}"
implementation "io.ktor:ktor-client-serialization-native:${versions.ktor}"
// Coroutines
api "org.jetbrains.kotlinx:kotlinx-coroutines-core-native:${versions.coroutines}"
}
}
iosSimMain {
dependencies {
implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime-iosx64:${versions.serialization}"
}
}
ios64Main {
dependencies {
implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime-iosarm64:${versions.serialization}"
}
}
androidMain.dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime:${versions.serialization}"
implementation "io.ktor:ktor-client-serialization-jvm:${versions.ktor}"
implementation "io.ktor:ktor-client-okhttp:${versions.ktor}"
implementation "com.squareup.okhttp3:logging-interceptor:4.0.1"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:${versions.coroutines}"
}
}
// Create a task building a fat framework.
task debugFatFramework(type: FatFrameworkTask) {
// The fat framework must have the same base name as the initial frameworks.
baseName = 'PassengerCommon'
// The default destination directory is '<build directory>/fat-framework'.
destinationDir = file("$buildDir/fat-framework/debug")
// Specify the frameworks to be merged.
from(
targets.ios64.binaries.getFramework("DEBUG"),
targets.iosSim.binaries.getFramework("DEBUG")
)
}
// Create a task building a fat framework.
task releaseFatFramework(type: FatFrameworkTask) {
// The fat framework must have the same base name as the initial frameworks.
baseName = 'PassengerCommon'
// The default destination directory is '<build directory>/fat-framework'.
destinationDir = file("$buildDir/fat-framework/release")
// Specify the frameworks to be merged.
from(
targets.ios64.binaries.getFramework("RELEASE"),
targets.iosSim.binaries.getFramework("RELEASE")
)
}
}
configurations {
compileClasspath
}
lastly this is the android modules build.gradle
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-android'
apply plugin: 'kotlinx-serialization'
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'com.google.gms.google-services'
repositories {
flatDir {
dirs 'libs'
}
google()
mavenCentral()
}
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
compileSdkVersion 28
defaultConfig {
applicationId "com.lines.passenger"
minSdkVersion 21
targetSdkVersion 28
versionCode 53
versionName "2.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
packagingOptions {
exclude 'META-INF/proguard/androidx-annotations.pro'
}
}
signingConfigs {
release {
try {
storeFile file('../keystores/release.jks')
storePassword *****
keyAlias "*****"
keyPassword *****
} catch (Exception ex) {
throw new Exception("You should define KEYSTORE_PASSWORD and KEY_PASSWORD in gradle.properties.")
}
}
debug {
storeFile file('../keystores/debug.keystore')
}
}
lintOptions {
checkReleaseBuilds false
abortOnError false
}
buildTypes {
debug {
applicationIdSuffix '.debug'
versionNameSuffix '-DEBUG'
resValue("string", "app_name", "Passenger")
signingConfig signingConfigs.debug
resValue("string", "g_maps_api_key", "*****")
manifestPlaceholders = [MAPS_API_KEY: "*****"]
resValue "string", "app_version", "${defaultConfig.versionName}"
resValue("string", "PUSHER_APP_KEY", "*****")
resValue("string", "new_relic_key", "*****")
}
release {
resValue "string", "app_version", "${defaultConfig.versionName}"
minifyEnabled true
shrinkResources true
zipAlignEnabled true
resValue("string", "app_name", "Lines")
signingConfig signingConfigs.release
resValue("string", "g_maps_api_key", "*****")
manifestPlaceholders = [MAPS_API_KEY: "*****"]
resValue("string", "PUSHER_APP_KEY", "*****")
resValue("string", "new_relic_key", "*****")
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/*.kotlin_module'
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testImplementation 'junit:junit:4.12'
testImplementation 'org.hamcrest:hamcrest-library:1.3'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.5.2'
testImplementation "io.mockk:mockk:1.9"
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.5.2'
implementation project(':PassengerCommon')
annotationProcessor 'com.jakewharton:butterknife-compiler:10.0.0'
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
implementation 'com.google.firebase:firebase-messaging:20.2.1'
implementation 'com.google.firebase:firebase-core:17.4.3'
implementation 'com.google.firebase:firebase-config:19.1.4'
implementation 'com.google.firebase:firebase-crashlytics:17.1.0'
implementation 'com.google.firebase:firebase-storage:19.1.1'
implementation 'com.google.android.gms:play-services-analytics:17.0.0'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.google.maps.android:android-maps-utils:0.4.4'
implementation 'com.afollestad.material-dialogs:core:0.9.5.0'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
implementation 'io.reactivex.rxjava2:rxjava:2.2.2'
implementation 'com.squareup.retrofit2:retrofit:2.2.0'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.2.0'
implementation 'com.squareup.retrofit2:converter-gson:2.2.0'
implementation 'com.jakewharton:butterknife:10.0.0'
implementation("com.jakewharton.retrofit:retrofit2-kotlinx-serialization-converter:0.5.0")
implementation 'com.karumi:dexter:4.2.0'
implementation 'de.hdodenhof:circleimageview:2.1.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.prolificinteractive:material-calendarview:1.4.3'
implementation 'com.squareup.okhttp3:logging-interceptor:3.8.0'
implementation 'q.rorbin:badgeview:1.1.3'
implementation 'com.jakewharton.rxbinding3:rxbinding:3.0.0-alpha2'
implementation 'info.hoang8f:android-segmented:1.0.6'
implementation 'com.elasticode.sdk:elasticode-android:2.1.1'
implementation 'net.cachapa.expandablelayout:expandablelayout:2.9.2'
implementation 'com.pusher:pusher-websocket-android:0.7.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:${versions.coroutines}"
}
apply plugin: 'com.google.gms.google-services'
If you guys need anything I will gladly provide
If the app works in debug but not in release, it's probably because Proguard minified your classes and deserialization no longer works due to different (shorter) class and property names.
Make sure you have this in your proguard:
-keepattributes *Annotation*, InnerClasses
-dontnote kotlinx.serialization.SerializationKt
-keep,includedescriptorclasses class com.yourcompany.yourpackage.**$$serializer { *; } # <-- change package name to your app's
-keepclassmembers class com.yourcompany.yourpackage.** { # <-- change package name to your app's
*** Companion;
}
-keepclasseswithmembers class com.yourcompany.yourpackage.** { # <-- change package name to your app's
kotlinx.serialization.KSerializer serializer(...);
}
If deserialization still fails, please provide an example of how you are deserializing network response(s) into data classes.

generate singed apk failed

when i update as to 3.6, there is an exception when i ./gradlew assembleRelease. and the infomation is like this
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:minifyReleaseWithR8'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$3.accept(ExecuteActionsTaskExecuter.java:166)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$3.accept(ExecuteActionsTaskExecuter.java:163)
at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:191)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:156)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:62)
...
Caused by: java.lang.NullPointerException
at com.android.tools.r8.naming.A.a(:7)
at com.android.tools.r8.naming.A.c(:1)
at com.android.tools.r8.naming.w.a(:71)
at com.android.tools.r8.naming.w.a(:54)
at com.android.tools.r8.naming.w.a(:61)
at com.android.tools.r8.naming.w.a(:61)
at com.android.tools.r8.naming.w.a(:29)
at com.android.tools.r8.naming.G.a(:25)
...
my project gradle is
buildscript {
ext.kotlin_version = '1.3.61'
apply from:'config.gradle'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.meituan.android.walle:plugin:1.1.6'
}
}
allprojects {
repositories {
google()
jcenter()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url 'http://oss.jfrog.org/artifactory/oss-snapshot-local/' }
maven { url "https://jitpack.io" }
}
}
my app gradle is
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-android'
apply plugin: 'walle'
def dep = rootProject.ext.dependencies
def and = rootProject.ext.android
android {
compileSdkVersion and.compileSdkVersion
buildToolsVersion and.buildToolsVersion
aaptOptions.cruncherEnabled = false
aaptOptions.useNewCruncher = false
defaultConfig {
applicationId and.appid
minSdkVersion and.minSdkVersion
targetSdkVersion and.targetSdkVersion
versionCode 215005
versionName '3.0'
multiDexEnabled true
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
ndk {
abiFilters 'armeabi'
}
manifestPlaceholders = [
JPUSH_PKGNAME : ,
JPUSH_APPKEY : ' ',
JPUSH_CHANNEL : ' ',
]
}
signingConfigs {
release {
keyAlias ' '
keyPassword ' '
storeFile file('./release-key.keystore')
storePassword ' '
v1SigningEnabled true
v2SigningEnabled true
}
debug {
keyAlias ' '
keyPassword ' '
storeFile file('. ')
storePassword ' '
}
}
buildTypes {
debug {
debuggable true
minifyEnabled false
signingConfig signingConfigs.debug
buildConfigField('boolean', 'ISRELEASE', '${IS_RELEASE}')
}
release {
debuggable false
minifyEnabled true
shrinkResources true
zipAlignEnabled true
signingConfig signingConfigs.release
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
buildConfigField('boolean', 'ISRELEASE', '${IS_RELEASE}')
}
}
sourceSets {
main {
jniLibs.srcDirs = ['libs']
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
encoding = 'UTF-8'
}
lintOptions {
abortOnError false
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation dep.eventbus
implementation dep.immersionbar
implementation dep.immersionbarfragment
implementation dep.SmartRefreshLayout
// implementation dep.networking
implementation project(':android-networking')
// implementation 'com.amitshekhar.android:jackson-android-networking:1.0.2'
//glide
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
implementation dep.glide
implementation 'com.github.bumptech.glide:okhttp3-integration:4.9.0'
implementation 'androidx.annotation:annotation:1.1.0'
annotationProcessor 'androidx.annotation:annotation:1.1.0'
implementation dep.rxjava2
implementation dep.okhttp3
implementation dep.rxandroid
implementation dep.rxbinding2
implementation project(':qmui')
implementation project(':arch')
implementation project(':emoji')
implementation project(':reclib-qq')
implementation 'com.facebook.stetho:stetho:1.1.1'
//flowLayout
implementation(project(':flowlayout-lib')) {
transitive = true
exclude group: 'androidx.appcompat', module: 'appcompat'
}
implementation dep.multidex
implementation dep.banner
implementation dep.toast
implementation dep.brvah
implementation dep.gson
implementation dep.baseadapter
//webview
api dep.agentweb
api 'com.just.agentweb:filechooser:4.1.2'//
api 'com.download.library:Downloader:4.1.2'//
implementation dep.picker_view
implementation dep.picker_picture
// api dep.aliyun
implementation 'com.amap.api:3dmap:7.0.0'
implementation 'com.amap.api:location:4.7.2'
implementation 'com.amap.api:search:6.9.2'
/**kotlin*/
implementation "androidx.core:core-ktx:1.1.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
//utils
implementation 'com.blankj:utilcode:1.25.9'
//tablayout//https://github.com/H07000223/FlycoTabLayout
implementation 'com.flyco.tablayout:FlycoTabLayout_Lib:2.1.2#aar'
//butter knife
implementation "com.jakewharton:butterknife:$butterknifeVersion"
annotationProcessor "com.jakewharton:butterknife-compiler:$butterknifeVersion"
// api 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:5.5.7'
api 'com.tencent.mm.opensdk:wechat-sdk-android-with-mta:5.3.1'
implementation 'com.yanzhenjie.recyclerview:x:1.3.2'
implementation 'com.kingja.loadsir:loadsir:1.3.6'
/*lottie*/
implementation('com.airbnb.android:lottie:3.2.0') { exclude group: 'com.androidx' }
implementation 'cn.jiguang.sdk:jmessage:2.9.0' //
implementation 'cn.jiguang.sdk:jcore:2.2.2' //
implementation project(':reclib-testemoticons')
implementation 'cn.jiguang.sdk:jpush:3.4.0' //
implementation 'com.github.chrisbanes.photoview:library:1.2.4'
implementation 'com.github.mtotschnig:StickyListHeaders:2.7.1'
implementation 'com.michaelpardo:activeandroid:3.1.0-SNAPSHOT'
implementation 'com.yanzhenjie:permission:2.0.3'
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit:3.0_beta2'
releaseImplementation 'com.didichuxing.doraemonkit:doraemonkit-no-op:3.0_beta2'
// api project(path: ':LibEasyGlide')
implementation 'com.binioter:guideview:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
//bugly
implementation 'com.tencent.bugly:crashreport:3.1.7'
implementation 'com.tencent.bugly:nativecrashreport:3.7.1'
implementation 'com.meituan.android.walle:library:1.1.6'
implementation "com.google.android.material:material:$materialVersion"
api project(path: ':LibEasyGlide')
}
the bottom is some dependencies, it all Commonly used library . when my android studio is 3.5.4,it work well, but when i update to 3.6 it build failed. i have no idea with this problem
and the gradle.properties is
org.gradle.jvmargs=-Xmx1536m
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
If you are use new NDK then try to add below code in gradle.properties (Project properties)
android.enableJetifier=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536m
android.enableD8=true
android.bundle.enableUncompressedNativeLibs=false

Maven Repository on Github not downloading transitive dependencies

I have created a maven repository and uploaded it to Github. When I add it as a dependency to a sample project, the gradle sync completes successfully. But when I try to run the app, it crashes with a java.lang.NoClassDefFoundError.
Link to repository: https://github.com/rjain90/sdk
Sample project code:
Project build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext{
kotlin_version = '1.3.20'
realm_version = '5.8.0'
}
repositories {
google()
jcenter()
maven { url "https://raw.githubusercontent.com/rjain90/sdk/master/" }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "io.realm:realm-gradle-plugin:$realm_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven { url "https://raw.githubusercontent.com/rjain90/sdk/master/" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
ext{
lifecycle_version = '2.0.0'
android_support_version = '1.1.0-alpha01'
legacy_support_version = '1.0.0'
constraint_version = '1.1.3'
retrofit_version = '2.4.0'
dagger_version = '2.16'
rxjava_version = '2.1.7'
rxandroid_version = '2.0.1'
}
Module build.gradle
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'realm-android'
// Load keystore
def keystorePropertiesFile = rootProject.file("keystore.properties");
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
android {
signingConfigs {
release {
keyAlias keystoreProperties['ANDROID_KEY_ALIAS']
keyPassword keystoreProperties['ANDROID_KEY_PASSWORD']
storeFile file(keystoreProperties['ANDROID_KEYSTORE_LOCATION'])
storePassword keystoreProperties['ANDROID_STORE_PASSWORD']
}
}
compileSdkVersion 28
defaultConfig {
applicationId "com.bowstring.godworld"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
debug {
debuggable true
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
release {
signingConfig signingConfigs.release
debuggable false
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
kapt "androidx.lifecycle:lifecycle-compiler:$lifecycle_version"
implementation "androidx.appcompat:appcompat:$android_support_version"
implementation "androidx.constraintlayout:constraintlayout:$constraint_version"
implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
implementation "com.squareup.retrofit2:converter-gson:$retrofit_version"
implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofit_version"
implementation "com.google.dagger:dagger:$dagger_version"
kapt "com.google.dagger:dagger-compiler:$dagger_version"
implementation "io.reactivex.rxjava2:rxandroid:$rxandroid_version"
implementation "androidx.legacy:legacy-support-v4:$legacy_support_version"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.cabfare.android:sdk:0.0.18#aar'
}
For GitHub hosted, you can use https://jitpack.io as a Maven repository.
Add maven { url 'https://jitpack.io' } into the project build.gradle's allprojects -> repositories block, then in your module build.gradle, add a dependency implementation 'com.github.rjain90:sdk:0.0.17', for example.
However, your two releases are both containing build errors. Solve them first.

Categories

Resources