2

I setup a new (Kotlin) project using Android Studio. When I take a look at my build.gradle (Project), I see this content:

// Top-level build file where you can add configuration options common to all sub-projects/modules.
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
}

However, other build.gradles seem to be completely different.

I searched all files, but couldn't find any occurrences of the buildscript, dependencies or any other block.

Where are they or how do I add them?

Myzel394
  • 826
  • 1
  • 13
  • 28

2 Answers2

1

There are two build.gradle files in android studio i.e. build.gradle(Project) & build.gradle(Module). Required blocks like buildscript, dependencies are available in build.gradle(Module)

enter image description here

build.gradle(Module) looks like:

enter image description here

Hope this will help :)

mr.volatile
  • 309
  • 5
  • 15
1

Repositories have been moved to settings.gradle and module Gradle has been moved to the app package.

Ali Doran
  • 35
  • 9