Travis Reitter
02/24/2022, 5:51 PMgradle/
, gradlew
, and gradle.bat
both at the project top-level and within android/
. I noticed because I had to update my gradle version in two separate gradle/wrapper/gradle-wrapper.properties
. But if I delete these files under android/
, I get Task 'wrapper' not found in project ':android'.
. What other changes would I need to make? Or do I have to keep both sets? If so, is there any way I can factor out the Gradle version into a single file?Vampire
02/24/2022, 6:21 PMwrapper
task when you do what? That implicit task is probably just added to the root project, but it's also strange why those files change that. Except maybe if in the parent project you have some logic in the settings script that adds a directory as subproject if those files are not found or as subbuild if the wrapper files are found or something like that. But impossible to say without seeing your build.Travis Reitter
02/24/2022, 11:42 PMinclude(":android")
include(":shared")
include(":SharedCode")
My root `build.gradle.kts`:
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:7.1.2")
classpath("com.android.tools.build:gradle-api:7.1.2")
// required by Firebase and possibly others
classpath("com.google.gms:google-services:4.3.10")
// Add the Firebase Crashlytics Gradle plugin.
val KOTLIN_VERSION: String by project
val SQL_DELIGHT_VERSION: String by project
classpath("com.google.firebase:firebase-crashlytics-gradle:2.8.1")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$KOTLIN_VERSION")
classpath("org.jetbrains.kotlin:kotlin-serialization:$KOTLIN_VERSION")
classpath("com.squareup.sqldelight:gradle-plugin:$SQL_DELIGHT_VERSION")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
maven {
url = uri("<https://maven.google.com/>")
name = "Google"
}
}
}
tasks.register("clean") {
doFirst {
delete(rootProject.buildDir)
}
}
Travis Reitter
02/24/2022, 11:44 PMgradlew
. This is what I get in the Android Studio build output when I do a Gradle sync:
Starting Gradle Daemon...
Gradle Daemon started in 697 ms
> Configure project :android
The RepositoryHandler.jcenter() method has been deprecated. This is scheduled to be removed in Gradle 8.0. JFrog announced JCenter's sunset in February 2021. Use mavenCentral() instead. Consult the upgrading guide for further information: <https://docs.gradle.org/7.3.3/userguide/upgrading_version_6.html#jcenter_deprecation>
at Build_gradle$3.invoke(build.gradle.kts:208)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
> Configure project :SharedCode
Kotlin Multiplatform Projects are an Alpha feature. See: <https://kotlinlang.org/docs/reference/evolution/components-stability.html>. To hide this message, add 'kotlin.mpp.stability.nowarn=true' to the Gradle properties.
FAILURE: Build failed with an exception.
* What went wrong:
Task 'wrapper' not found in project ':android'.
Travis Reitter
02/24/2022, 11:50 PMVampire
02/25/2022, 10:18 AM