Android studio Bumblebee 2021.1.1 gradle files
Asked Answered
T

5

3

I updated to Android studio Bumblebee 2021.1.1 , the gradle.settings(Project) file structure changes, How can I add the dependencies and classpath for hilt or navigation now?

Android Studio gradle

Thingumajig answered 22/2, 2022 at 17:19 Comment(1)
Does this answer your question? How to add plugins in the Android Studio BumblebeePacesetter
I
4

You can use dependencies as below in Project level bulild.gradle

id 'com.google.dagger.hilt.android' version '2.41' apply false

id 'androidx.navigation.safeargs' version '2.4.2' apply false
Intoxicated answered 4/3, 2022 at 3:34 Comment(2)
and how i can add navigation plugin classpath("androidx.navigation:navigation-safe-args-gradle-plugin:2.4.1") ?Yorkshire
Updated for navigation as well @RohitJakharIntoxicated
R
3

You can add it at the first line

You can add it at the first line

Raina answered 25/2, 2022 at 10:1 Comment(1)
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.Righthand
S
1

Add Project level dependencies inside buildscript block like shown below :

buildscript {
    ext {
        compose_version = '1.2.0-alpha04'
        hilt_version = '2.41'
        accompanist_version = '0.24.2-alpha'
    }
    dependencies {
        classpath 'com.google.dagger:hilt-android-gradle-plugin:2.40.5'\
    }
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
    id 'com.android.application' version '7.3.0-alpha03' apply false
    id 'com.android.library' version '7.3.0-alpha03' apply false
    id 'org.jetbrains.kotlin.android' version '1.6.10' apply false
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
Streusel answered 25/2, 2022 at 10:13 Comment(0)
O
1

First of all, it is necessary to live like writing an add-on to be added, for this I am showing such an example.

the code is id 'androidx.navigation.safeargs' version'2.4.2' apply false you need to write like this

Olshausen answered 25/4, 2022 at 12:43 Comment(1)
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.Righthand
O
1

Add this two lines in Project level build gradle

id 'com.google.dagger.hilt.android' version '2.41' apply false

id 'androidx.navigation.safeargs' version '2.4.2' apply false

Add in App level build gradle

plugins {
id 'androidx.navigation.safeargs'
id 'dagger.hilt.android.plugin' 
}
Omland answered 25/10, 2022 at 5:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.