Skip to content

Commit

Permalink
Update project files
Browse files Browse the repository at this point in the history
  • Loading branch information
tananaev committed Nov 12, 2023
1 parent 71317bd commit c2eabb4
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 31 deletions.
58 changes: 36 additions & 22 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,28 +1,42 @@
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'com.google.gms.google-services'
id 'com.google.firebase.crashlytics'
}

android {
compileSdkVersion 33

compileSdk 34
defaultConfig {
applicationId "com.tananaev.logcat"
minSdkVersion 19
targetSdkVersion 33
versionCode 14
versionName "2.0"
targetSdkVersion 34
versionCode 15
versionName "2.1"
multiDexEnabled true
}
namespace "com.tananaev.logcat"

flavorDimensions 'default'
buildFeatures {
flavorDimensions = ['default']
}
productFlavors {
regular {
isDefault = true
ext.enableCrashlytics = false
}
google
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}

lint {
checkReleaseBuilds false
}
Expand All @@ -31,28 +45,28 @@ android {
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'com.android.support:multidex:2.0.1'
implementation 'com.google.android.material:material:1.7.0'
implementation 'androidx.core:core-ktx:1.9.0'
implementation 'com.google.android.material:material:1.10.0'
implementation 'androidx.core:core-ktx:1.12.0'
implementation 'com.tananaev:adblib:1.2'
googleImplementation platform('com.google.firebase:firebase-bom:31.0.1')
googleImplementation 'com.google.firebase:firebase-analytics-ktx'
googleImplementation 'com.google.firebase:firebase-crashlytics'
googleImplementation 'com.google.android.gms:play-services-ads:21.4.0'
googleImplementation 'com.google.android.gms:play-services-ads:22.5.0'
googleImplementation 'com.google.android.play:review-ktx:2.0.1'
}

if (getGradle().getStartParameter().getTaskRequests().toString().contains('Google')) {
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'

task copyJson(type: Copy) {
from '../../environment/firebase'
into '.'
include 'rootless-logcat.json'
rename('rootless-logcat.json', 'google-services.json')
}

afterEvaluate {
preBuild.dependsOn copyJson
tasks.register('copyFirebaseConfig', Copy) {
from '../../environment/firebase'
into '.'
include 'rootless-logcat.json'
rename('rootless-logcat.json', 'google-services.json')
}
afterEvaluate {
tasks.matching { it.name.contains('Google') }.configureEach { task ->
if (task.name.contains('Regular')) {
task.enabled false
} else {
task.dependsOn copyFirebaseConfig
}
}
}
12 changes: 4 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
buildscript {
ext.kotlin_version = '1.7.20'
ext.kotlin_version = '1.9.20'
repositories {
google()
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.android.tools.build:gradle:7.3.1'
classpath 'com.google.gms:google-services:4.3.14'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2'
classpath 'com.android.tools.build:gradle:8.2.0-rc03'
classpath 'com.google.gms:google-services:4.4.0'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.9'
}
}

Expand All @@ -18,7 +18,3 @@ allprojects {
mavenCentral()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
android.enableJetifier=true
android.nonFinalResIds=false
android.nonTransitiveRClass=false
android.useAndroidX=true
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip

0 comments on commit c2eabb4

Please sign in to comment.