yellowstonegames / SquidLib

Useful tools for roguelike, role-playing, strategy, and other grid-based games in Java. Feedback is welcome!
Other
454 stars 46 forks source link

Not able to import Graph class when using 3.0.4 but working with 3.0.3 #211

Closed fkallsbo closed 2 years ago

fkallsbo commented 2 years ago

I wasn't able to import the graph class using

import squidpony.squidai.graph.Graph;

When using

dependencies {
    api "com.badlogicgames.gdx:gdx:$gdxVersion"
    api "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
    implementation 'com.github.yellowstonegames:squidlib:3.0.4'
    implementation 'com.github.yellowstonegames:squidlib-util:3.0.4'
}

}`

But chaning version to 3.0.3 fixes it and makes it possible for me to import.

dependencies {
    api "com.badlogicgames.gdx:gdx:$gdxVersion"
    api "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
    implementation 'com.github.yellowstonegames:squidlib:3.0.3'
    implementation 'com.github.yellowstonegames:squidlib-util:3.0.3'
}

}`

rodohanna commented 2 years ago

I'm also experiencing this and can confirm that rolling back to 3.0.3 resolves the issue.

As a note:

distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
gdxVersion = '1.10.0'
tommyettinger commented 2 years ago

Investigating now... This seems like something strange.

tommyettinger commented 2 years ago

I need to double-check what the docs give for the correct dependency to use, but the com.github.yellowstonegames group is used for JitPack, where Maven Central releases use com.squidpony . There's another difference, because JitPack needs the name of the GitHub project as well as the Gradle module:

  api "com.github.yellowstonegames.SquidLib:squidlib:3.0.4"
  api "com.github.yellowstonegames.SquidLib:squidlib-util:3.0.4"

This seems to be enough in SquidLib-Demos' BasicDemo project. Next, I'll try avoiding mavenLocal() over here to ensure I'm not getting a local build that no one else has. I had already done this, so the above JitPack instructions should work as long as JitPack was able to build release 3.0.4 .

tommyettinger commented 2 years ago

Also, this should work if you don't want a JitPack-compiled release (it gets a stable release from Maven Central):

  api "com.squidpony:squidlib:3.0.4"
  api "com.squidpony:squidlib-util:3.0.4"