junkdog / artemis-odb

A continuation of the popular Artemis ECS framework
BSD 2-Clause "Simplified" License
779 stars 112 forks source link

[BUG] Fluid plugin overzealous at scanning classpath. #578

Closed DaanVanYperen closed 3 years ago

DaanVanYperen commented 5 years ago

When compiling with gradlew fluid -i (and logging fixed), the fluid plugin can be seen scanning loads of extra artifacts. To speed up compilation see Workaround below.

Suggested fix

Properly document. Also consider making excludeFromClasspath match with regexp, right now it works by partial match, so if you exclude artemis-odb and your artifacts happen to be in the folder my-artemis-odb-games/ the whole thing blows up.

Workaround

Enable logging and check which deps are being scanned using plugin arguments, and exclude those. Alternatively limit the scanned classpath to just your component artifacts.

fluid {
    preferences.excludeFromClasspath += [
            // speed up compilation by skipping dependencies without components.
            "guava-",
            "reflections-",
            "commons-lang3-",
            "javapoet-",
            "fast-classpath-scanner-",
            "commons-io-",
            "javassist-",
    ]
junkdog commented 5 years ago

Do we want to do this for 2.3.0 or shall we move it to the subsequent release?

DaanVanYperen commented 3 years ago

Documented in the wiki page for Gradle and added more exclusions to the plugin defaults.