Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies & gradle.properties #2679

Closed
wants to merge 15 commits into from
8 changes: 4 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ buildscript {
val kotlinVersion = rootProject.extra["kotlinVersion"].toString()
classpath(rootProject.extra["androidPlugin"].toString())
classpath(kotlin("gradle-plugin", kotlinVersion))
classpath("com.google.android.gms:oss-licenses-plugin:0.10.2")
classpath("com.google.firebase:firebase-crashlytics-gradle:2.4.1")
classpath("com.google.android.gms:oss-licenses-plugin:0.10.3")
classpath("com.google.firebase:firebase-crashlytics-gradle:2.5.2")
classpath("com.google.gms:google-services:4.3.5")
classpath("com.vanniktech:gradle-maven-publish-plugin:0.13.0")
classpath("com.vanniktech:gradle-maven-publish-plugin:0.14.2")
classpath("gradle.plugin.org.mozilla.rust-android-gradle:plugin:0.8.3")
classpath("org.jetbrains.dokka:dokka-gradle-plugin:1.4.20")
classpath("org.jetbrains.dokka:dokka-gradle-plugin:1.4.30")
}
}

Expand Down
4 changes: 2 additions & 2 deletions buildSrc/src/main/kotlin/Helpers.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import org.gradle.kotlin.dsl.getByName
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmOptions
import java.util.*

const val lifecycleVersion = "2.3.0-rc01"
const val lifecycleVersion = "2.3.1"

private val Project.android get() = extensions.getByName<BaseExtension>("android")

Expand Down Expand Up @@ -46,7 +46,7 @@ fun Project.setupCommon() {
}

dependencies {
add("testImplementation", "junit:junit:4.13.1")
add("testImplementation", "junit:junit:4.13.2")
add("androidTestImplementation", "androidx.test:runner:1.3.0")
add("androidTestImplementation", "androidx.test.espresso:espresso-core:3.3.0")
}
Expand Down
18 changes: 11 additions & 7 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import com.android.build.gradle.internal.tasks.factory.dependsOn
import org.jetbrains.kotlin.gradle.plugin.KaptExtension

plugins {
id("com.android.library")
Expand All @@ -19,9 +20,10 @@ android {
arguments("-j${Runtime.getRuntime().availableProcessors()}")
}

javaCompileOptions.annotationProcessorOptions.arguments(mapOf(
"room.incremental" to "true",
"room.schemaLocation" to "$projectDir/schemas"))
extensions.getByName<KaptExtension>("kapt").arguments {
arg("AROUTER_MODULE_NAME", project.name)
arg("room.schemaLocation", "$projectDir/build")
}
}

externalNativeBuild.ndkBuild.path("src/main/jni/Android.mk")
Expand Down Expand Up @@ -68,19 +70,21 @@ dependencies {

api(project(":plugin"))
api("androidx.appcompat:appcompat:1.2.0")
api("androidx.core:core-ktx:1.5.0-beta01")
api("androidx.core:core-ktx:1.5.0-beta03")

api("androidx.fragment:fragment-ktx:1.3.0-rc02")
api("androidx.activity:activity-ktx:1.2.2")
api("androidx.fragment:fragment-ktx:1.3.2")
api("androidx.lifecycle:lifecycle-common-java8:$lifecycleVersion")
api("androidx.lifecycle:lifecycle-livedata-core-ktx:$lifecycleVersion")
api("androidx.recyclerview:recyclerview:1.2.0")
api("androidx.preference:preference:1.1.1")
api("androidx.room:room-runtime:$roomVersion")
api("androidx.work:work-multiprocess:$workVersion")
api("androidx.work:work-runtime-ktx:$workVersion")
api("com.google.android.gms:play-services-oss-licenses:17.0.0")
api("com.google.code.gson:gson:2.8.6")
api("com.google.firebase:firebase-analytics-ktx:18.0.2")
api("com.google.firebase:firebase-crashlytics:17.3.1")
api("com.google.firebase:firebase-analytics-ktx:18.0.3")
api("com.google.firebase:firebase-crashlytics:17.4.1")
api("com.jakewharton.timber:timber:4.7.1")
api("dnsjava:dnsjava:3.3.1")
api("org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion")
Expand Down
29 changes: 12 additions & 17 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
# Project-wide Gradle settings.

# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.

# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
android.enableJetifier=true
android.enableR8.fullMode=true
android.injected.testOnly=false
android.useAndroidX=true
kapt.include.compile.classpath=false
kapt.incremental.apt=true

# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
org.gradle.jvmargs=-Xmx1536m
kapt.use.worker.api=true
kapt.verbose=true
kotlin.code.style=official
kotlin.incremental=true
kotlin.incremental.usePreciseJavaTracking=true
kotlin.parallel.tasks.in.project=true
org.gradle.caching=true
org.gradle.configureondemand=true
org.gradle.jvmargs=-Xmx4g -Dfile.encoding=UTF-8
org.gradle.parallel=true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add gradle params to enhance speed of build,like parallel build, enlarge heap size, use cache ...

2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion mobile/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies {
implementation("androidx.browser:browser:1.3.0")
implementation("androidx.camera:camera-camera2:$cameraxVersion")
implementation("androidx.camera:camera-lifecycle:$cameraxVersion")
implementation("androidx.camera:camera-view:1.0.0-alpha21")
implementation("androidx.camera:camera-view:1.0.0-alpha23")
implementation("androidx.constraintlayout:constraintlayout:2.0.4")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion")
implementation("com.google.mlkit:barcode-scanning:16.1.1")
Expand Down
4 changes: 2 additions & 2 deletions repositories.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
rootProject.extra.apply {
set("androidPlugin", "com.android.tools.build:gradle:4.1.2")
set("kotlinVersion", "1.4.30")
set("androidPlugin", "com.android.tools.build:gradle:4.1.3")
set("kotlinVersion", "1.4.32")
}

repositories {
Expand Down