```* What went wrong: A problem occurred configuri...
# gradle
r
Copy code
* What went wrong:
A problem occurred configuring root project 'myProject'.
> compileSdkVersion is not specified.
Since when is
compileSdkVersion
required in the root build script?
✔️ 1
g
Probably you applied android plugin on root script
plugins dsl applies plugin by default
r
My entire build.gradle.kts is just above, this applies the android plugin?
g
you have 2 options: use
apply false
, but you need it only if you want for example configure this plugin for other modules without application
Yes, it is
You don’t need android and kotlin plugins there
apply them only when tthey needed in the module
r
I really just translated the original
build.gradle
, I don't know if it was correct in the first place
I'm not sure what should be in the root build script of an android project
g
Actually nothing
for example you can add repositories to all submodules
r
I only have and will only ever have a single submodule, so I don't need anything in the root script? Like I empty the file?
g
Yes
r
Wow
g
probably you want to add:
Copy code
subprojects {
   repositories {
        google()
        jcenter()
    }
}
so you can configure repositories for all submodules
r
But I only have one submodule, and it's included by the
settings.gradle.kts
script, so do I need the root file at all? Maybe gradle won't even start if the file isn't here
g
Up to you
it’s good to have root project, because allows easily add more modules
and in modern Android dev it’s usually good practice to modularize your app