I'm finally getting back to the project that inspired this question. According to the answer, I need to add
buildscript{
dependencies {
...
classpath 'com.badlogicgames.gdx:gdx-tools:1.5.4'
}
}
to my project's base build.gradle file. Of course, libgdx is at a different version now. I would like to use the gdxVersion
variable similar to the various project's dependencies:
compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
When I try
classpath "com.badlogicgames.gdx:gdx-tools:$gdxVersion"
I get
Could not get unknown property 'gdxVersion' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
Clearly Gradle is unable to resolve the gdxVersion
variable that is in allprojects.ext
. What is the syntax to access this variable?