0
\$\begingroup\$

Hello i am trying to use BitBucket's Box2DSprite, i am having trouble in setting dependencies i used this link for Dependency https://bitbucket.org/dermetfan/libgdx-utils/wiki/Dependency%20Instructions

i am getting error like-Error:(91, 0) Could not find property 'gdxUtilsVersion' on org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler_Decorated@570f3dca. Open File

and my gradle build file is

   buildscript {
        repositories {
            mavenLocal()
            mavenCentral()
            maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
            jcenter()
        }
        dependencies {
            classpath 'de.richsource.gradle.plugins:gwt-gradle-plugin:0.6'
            classpath 'com.android.tools.build:gradle:1.5.0'
        }
    }

    allprojects {
        apply plugin: "eclipse"
        apply plugin: "idea"

        version = '1.0'
        ext {
            appName = "Now_create"
            gdxVersion = '1.9.3'
            roboVMVersion = '2.1.0'
            box2DLightsVersion = '1.4'
            ashleyVersion = '1.7.0'
            aiVersion = '1.8.0'
        }

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

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


        dependencies {
            compile project(":core")
            compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
            compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
            compile "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-desktop"
            compile "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-desktop"
            compile "com.badlogicgames.gdx:gdx-tools:$gdxVersion"

        }
    }

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

        configurations { natives }

        dependencies {
            compile project(":core")
            compile "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"
            compile "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"
            compile "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"
        }
    }

    project(":html") {
        apply plugin: "gwt"
        apply plugin: "war"


        dependencies {
            compile project(":core")
            compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion"
            compile "com.badlogicgames.gdx:gdx:$gdxVersion:sources"
            compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion:sources"
            compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion:sources"
            compile "com.badlogicgames.gdx:gdx-box2d-gwt:$gdxVersion:sources"
            compile "net.dermetfan.libgdx-utils:libgdx-utils:                      $gdxUtilsVersion:sources"
            compile "net.dermetfan.libgdx-utils:libgdx-utils-box2d:              $gdxUtilsVersion:sources"
        }
    }

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


        dependencies {
            compile "com.badlogicgames.gdx:gdx:$gdxVersion"
            compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
            compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
            compile "net.dermetfan.libgdx-utils:libgdx-utils:$gdxUtilsVersion"
            compile "net.dermetfan.libgdx-utils:libgdx-utils-box2d:$gdxUtilsVersion"

        }
    }

    tasks.eclipse.doLast {
        delete ".project"
    }

i can summerize the changes i have made first add these dependency to core project

compile "net.dermetfan.libgdx-utils:libgdx-utils:$gdxUtilsVersion"
        compile "net.dermetfan.libgdx-utils:libgdx-utils-box2d:$gdxUtilsVersion"

and add these to Html

  compile "net.dermetfan.libgdx-utils:libgdx-utils:$gdxUtilsVersion:sources"
    compile "net.dermetfan.libgdx-utils:libgdx-utils-box2d:$gdxUtilsVersion:sources" 
\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

I guess you are missing something,try adding this line to ext in all project

ext{
    gdxUtilsVersion = '0.13.3'
}
\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .