Home > front end >  How to add project level dependency class path in Android Studio Bumblebee
How to add project level dependency class path in Android Studio Bumblebee

Time:02-24

Since I updated my Android Studio to Bumblebee in the project level build.gradle file contains the plugins block as bellow:

plugins {
    id 'com.android.application' version '7.1.1' apply false
    id 'com.android.library' version '7.1.1' apply false
    id 'org.jetbrains.kotlin.android' version '1.6.10' apply false
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

here the repository settings that were previously in the top-level build.gradle file are now in the settings.gradle file.

With this change I'm not able to add new plugins to my app, I want to add the following plugin to my project which I have added to my app level build.gradle.

apply plugin: 'kotlin-android-extensions'
apply plugin: "androidx.navigation.safeargs.kotlin"

In order to make this work I need to add the class path in my project level build.gradle, however due to the recent change in the build.gradle structure I'm not sure how to add the following line in my project level build.gradle

dependencies {
       
        classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.3.0"
    }

I tried to find the solution in https://developer.android.com/studio/releases/gradle-plugin, however I was not able to see any solution, however I got that this change was from Android Studio Bumblebee with the gradle plugin version 7.0.0

Please help me out to add the dependency.

CodePudding user response:

Use this line:

id 'androidx.navigation.safeargs.kotlin' version '2.5.0-alpha01' apply false
  • Related