3

everyone! I am trying to add dependencies to gdx-pd in build.gradle, but when I try to synk the project, I am getting this error:

Caused by: groovy.lang.MissingPropertyException: Could not get unknown property 'pdVersion' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

This is how my Gradle file looks like:

buildscript {


repositories {
    mavenLocal()
    mavenCentral()
    maven { url "https://plugins.gradle.org/m2/" }
    maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
    jcenter()
    google()
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.6.1'


}

}

allprojects {

version = '1.0'
ext {
    appName = "audio-demo"
    gdxVersion = '1.9.10'
    roboVMVersion = '2.3.7'
    box2DLightsVersion = '1.4'
    ashleyVersion = '1.7.0'
    aiVersion = '1.8.0'
}

repositories {
    mavenLocal()
    mavenCentral()
    jcenter()
    google()
    maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
    maven { url "https://oss.sonatype.org/content/repositories/releases/" }
}

}

project(":desktop") { apply plugin: "java-library"

dependencies {
    implementation project(":core")
    api "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
    api "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
    api "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-desktop"
    api "com.badlogicgames.gdx:gdx-tools:$gdxVersion"
    api "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-desktop"
    api "net.mgsx.gdx:gdx-pd-platform:$pdVersion:desktop"
    api "net.mgsx.gdx:gdx-pd-platform:$pdVersion:natives-desktop"
}

}

project(":android") { apply plugin: "android"

configurations { natives }

dependencies {
    implementation project(":core")
    api "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
    natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi"
    natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
    natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-arm64-v8a"
    natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
    natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86_64"
    api "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
    natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi"
    natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi-v7a"
    natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-arm64-v8a"
    natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86"
    natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86_64"
    api "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
    natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi"
    natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi-v7a"
    natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-arm64-v8a"
    natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86"
    natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86_64"
    api "net.mgsx.gdx:gdx-pd-backend-android:$pdVersion"
    natives "net.mgsx.gdx:gdx-pd-platform:$pdVersion:natives-armeabi"
    natives "net.mgsx.gdx:gdx-pd-platform:$pdVersion:natives-armeabi-v7a"
    natives "net.mgsx.gdx:gdx-pd-platform:$pdVersion:natives-arm64-v8a"
    natives "net.mgsx.gdx:gdx-pd-platform:$pdVersion:natives-x86"
    natives "net.mgsx.gdx:gdx-pd-platform:$pdVersion:natives-x86_64"
}

}

project(":core") { apply plugin: "java-library"

dependencies {
    api "com.badlogicgames.gdx:gdx:$gdxVersion"
    api "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
    api "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
    api "net.mgsx.gdx:gdx-pd:$pdVersion"
}

}

If I try to specify $pdVersion like this:

ext {
    ...
    pdVersion = '0.7.0'
}

I am getting another error:

ERROR: Failed to resolve: net.mgsx.gdx:gdx-pd:0.7.0 Show in Project Structure dialog Affected Modules: core ERROR: Failed to resolve: net.mgsx.gdx:gdx-pd:0.7.0 Show in Project Structure dialog Affected Modules: android

What am I doing wrong? Thank you in advance!

Max N
  • 1,134
  • 11
  • 23
Picaro
  • 31
  • 1
  • 1
    The README for that library says it's not available on Maven Central (or apparently any public maven repo), and so you must build it locally and publish to your local maven repo. – Tenfour04 Jun 18 '20 at 04:07

0 Answers0