Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add plugins in the Android Studio Bumblebee

I want to add dagger-hilt plugin to project.

 classpath 'com.google.dagger:hilt-android-gradle-plugin:2.40.5'

https://developer.android.com/studio/preview/features#settings-gradle

plugins {
    id 'com.android.application' version '7.1.0-beta02' apply false
    id 'com.android.library' version '7.1.0-beta02' apply false
    id 'org.jetbrains.kotlin.android' version '1.5.30' apply false
}

task clean(type: Delete) {
  delete rootProject.buildDir
}
pluginManagement {
  repositories {
    gradlePluginPortal()
    google()
    mavenCentral()
  }
}

dependencyResolutionManagement {
  repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
  repositories {
    google()
    mavenCentral()
  }
}
rootProject.name = 'GradleManagedDeviceTestingNew'
include ':app'
like image 780
Vixb Avatar asked Mar 20 '26 01:03

Vixb


1 Answers

This is the correct to using the classpath in bumblebee

Use buildscript before plugins it will work and put your classpath there in the dependencies block

buildscript {
    dependencies {
        classpath("com.google.dagger:hilt-android-gradle-plugin:2.40.5")
    }
}


plugins {
    id 'com.android.application' version '7.1.0-rc01' apply false
    id 'com.android.library' version '7.1.0-rc01' apply false
    id 'org.jetbrains.kotlin.android' version '1.5.30' apply false
}



task clean(type: Delete) {
    delete rootProject.buildDir
}
like image 70
Nitin Prakash Avatar answered Mar 22 '26 15:03

Nitin Prakash



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!