[SOLVED] Every time openning SDK it resolves dependencies from internet

Hi again

Every time i open jme sdk it resolves dependency from Internet and eats my bandwidth :

how should i solve it so to use from local repo?

I am on linux

thanks in advance

Did you put mavenLocal() in your repositories?

they have :

for xbuf :

//------------------------------------------------------------------------------
// Global
// content of this section could be placed in an other script
//------------------------------------------------------------------------------

allprojects {
    //apply plugin: 'nebula.lint'
    //gradleLint.rules = ['all-dependency']

    project.version = "git describe --always --dirty".execute().text.trim()
    println("version : '${project.version}'")
    group = "org.xbuf.jme3_xbuf"
    def description = 'xbuf lib and tools for jMonkeyEngine (jme3)'
}

subprojects {
    apply plugin: 'java' // assets are managed like java resource + code
    apply plugin: 'maven'
    apply plugin: 'eclipse'

    repositories {
        mavenLocal()
        jcenter()
        maven { url "http://dl.bintray.com/davidb/jme3stuff" }
        maven { url "https://jitpack.io" }
    }

    sourceCompatibility = JavaVersion.VERSION_1_8
    targetCompatibility = JavaVersion.VERSION_1_8
    [compileJava, compileTestJava]*.options*.encoding = 'UTF-8'

    task sourcesJar(type: Jar) {
        from sourceSets.main.allSource
        classifier = 'sources'
    }

    task writeNewPom << {
        pom {
            project {
                inceptionYear '2015'
                description project.description
                licenses {
                    license {
                        name "Public domain (CC0-1.0)"
                        url "http://creativecommons.org/publicdomain/zero/1.0/"
                        distribution "repo"
                    }
                }
                developers {
                    developer {
                        id "davidB"
                        name "David Bernard"
                    }
                    developer {
                        id "riccardobl"
                        name "Riccardo Balbo"
                    }
                }
            }
        }.writeTo("$buildDir/newpom.xml")
    }
}

for jme-physicsloader :

def DEV_MODE=true
if (DEV_MODE){
    apply plugin: "maven"
    version="SNAPSHOT"
    group="dev"
}


buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath "com.netflix.nebula:gradle-extra-configurations-plugin:3.1.0"
  }
}
apply plugin: 'java'
apply plugin: 'nebula.provided-base'


def jme_version ="3.1.0-beta1"
def jme_group =  "org.jmonkeyengine"

def javaVersion='1.7'

targetCompatibility = javaVersion
sourceCompatibility = javaVersion
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
            
repositories {
    mavenLocal()
    jcenter()
    maven { url "https://jitpack.io" }
    maven{ url "http://dl.bintray.com/riccardo/v-hacd" }
}

dependencies {
    provided "${jme_group}:jme3-core:${jme_version}"
    provided "${jme_group}:jme3-bullet:${jme_version}"
    provided 'com.github.riccardobl:jme3-bullet-vhacd:1.0'    
}

Note : i built SDK from source yesterday .

I moved directory “jmonkeyplatform” which was built inside “sdk-master/dist” folder to somewhere outside sdk-master (which is a netbeans project) directory and now when running it no more downloads jars from Internet (as you see was downloading in the screen-shot in my first post)

I don’t know what could be the origin of the issue. I suggest you to totally delete every trace of the SDK you have in that repo and download it again,then rebuild.

However this is probably an issue regarding the build.gradle file. I’m a newbie at using gradle so let’s wait if someone more experienced answers the thread.

1 Like