Slackbot
06/24/2022, 12:48 PMVampire
06/24/2022, 4:20 PMVampire
06/24/2022, 4:20 PMimplementation configuration while the implementation configuration does not exist.Miguel
06/25/2022, 1:35 PMMiguel
06/25/2022, 1:36 PMMiguel
06/25/2022, 1:36 PMdef localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion flutter.compileSdkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
// TODO: Specify your own unique Application ID (<https://developer.android.com/studio/build/application-id.html>).
applicationId "com.shoppingworld.usersapp"
minSdkVersion 19
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
apply plugin: 'com.google.gms.google-services'Miguel
06/25/2022, 1:36 PMMiguel
06/25/2022, 1:36 PMbuildscript {
ext.kotlin_version = '1.6.21'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.google.gms:google-services:4.3.12'
classpath 'com.android.tools.build:gradle:4.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(":app")
}
task clean(type: Delete) {
delete rootProject.buildDir
}
dependencies {
implementation 'com.android.support:support-annotations:28.0.0'
implementation 'androidx.annotation:annotation:1.4.0'
}Miguel
06/25/2022, 1:37 PMMiguel
06/25/2022, 1:37 PMCould not find method implementation() for arguments [com.android.supportsupport annotations28.0.0] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.* Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 24s Exception: Gradle task assembleDebug failed with exit code 1
Vampire
06/26/2022, 10:13 AMYou are trying to define a dependency for theOn the project where you try to define those, dependencies no plugin is applied that would add that configuration. I guess you wanted to add this to the other build script. I highly recommend using Kotlin DSL build scripts, because then your build scripts are immediately type-safe and you have muuuch better IDE support and would e. g. immediately have seen that it is an unresolved symbol. Btw. just in case you are not aware, your build scritps are sprinkled with bad or legacy practices likeconfiguration while theimplementationconfiguration does not exist.implementation
subprojects { ... } blocks, allprojects { ... } blocks, legacy plugin application instead of plugins { ... } block, ...Miguel
06/26/2022, 5:23 PMVampire
06/26/2022, 5:25 PMMiguel
06/26/2022, 5:31 PMMiguel
06/26/2022, 5:49 PMVampire
06/26/2022, 8:23 PM