czyzby/gdx-lml

Change VisUi that used by gdx-lml-vis

Tokenyet opened this issue · 3 comments

Is there a possible to change it by include a VisUi.jar? I want to change the code that Used by gdx-lml-vis. There is a locked value that designed bad from VisUi in BasicColorPicker, public static final int PALETTE_SIZE = 160;

I want to change it to 320, but I really like gdx-lml-vis, and it dependent on it, so I could not change it directly...

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

    dependencies {
        compile "com.badlogicgames.gdx:gdx:$gdxVersion"
        compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
        compile "com.github.czyzby:gdx-lml-vis:1.9.1.9.6"
        compile "com.github.czyzby:gdx-lml:1.9.1.9.6"
        compile "de.tomgrill.gdxdialogs:gdx-dialogs-core:1.2.0"
        compile "de.tomgrill.gdxfacebook:gdx-facebook-core:1.4.1"
        compile "net.dermetfan.libgdx-utils:libgdx-utils:0.13.4"
        //compile fileTree(dir: 'libs', include: '*.jar')
    }
}

This is not an LML issue, it's more of a Gradle setup problem. Anyway, make an issue in the VisUI repo, maybe @kotcrab can make this setting public and modifiable.

That said, there are ways you can override existing libs. Try cloning VisUI repository, make the appropriate changes, switch the version to a higher one that is currently available and publish the artifact to your Maven Local (it's gradle build install if VisUI is using Gradle). Then you can add mavenLocal() to the repositories and include your modified VisUI lib as any other. Google for including libs from Maven Local via Gradle.

@czyzby I still have a question, how could gdx-lml-vis use VisUi? In my gradle, I have never include the VisUI myself.

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

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

		version = '1.0'
		ext {
			appName = "MyApp"
			gdxVersion = '1.9.6'
			roboVMVersion = '2.3.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-freetype-platform:$gdxVersion:natives-desktop"
			compile "de.tomgrill.gdxdialogs:gdx-dialogs-desktop:1.2.0"
			compile "de.tomgrill.gdxfacebook:gdx-facebook-desktop:1.4.1"
		}
	}

	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-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"
			compile "de.tomgrill.gdxdialogs:gdx-dialogs-android:1.2.0"
			compile "de.tomgrill.gdxfacebook:gdx-facebook-android:1.4.1"
			compile "com.android.support:support-v4:25.0.1"

		}
	}

	project(":ios") {
		apply plugin: "java"
		apply plugin: "robovm"


		dependencies {
			compile project(":core")
			compile "com.mobidevelop.robovm:robovm-rt:$roboVMVersion"
			compile "com.mobidevelop.robovm:robovm-cocoatouch:$roboVMVersion"
			compile "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion"
			compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios"
			compile "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-ios"
			compile "de.tomgrill.gdxdialogs:gdx-dialogs-ios:1.2.0"
			compile "de.tomgrill.gdxfacebook:gdx-facebook-ios:1.4.1"
		}
	}

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


		dependencies {
			compile "com.badlogicgames.gdx:gdx:$gdxVersion"
			compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
			compile "com.github.czyzby:gdx-lml-vis:1.9.1.9.6"
			compile "com.github.czyzby:gdx-lml:1.9.1.9.6"
			compile "de.tomgrill.gdxdialogs:gdx-dialogs-core:1.2.0"
			compile "de.tomgrill.gdxfacebook:gdx-facebook-core:1.4.1"
			compile "net.dermetfan.libgdx-utils:libgdx-utils:0.13.4"
			//compile fileTree(dir: 'libs', include: '*.jar')
		}
	}

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

Maybe this is a stupid question, but I could not figure out...

LML depends on VisUI, so Gradle includes it as a dependency. You can include VisUI explicitly with:

compile group: 'com.kotcrab.vis', name: 'vis-ui', version: '1.3.0'
// Note: if you upload to Maven Local, switch to your version.