forked from MovingBlocks/Terasology
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Module experiment - build harness #87
Open
Cervator
wants to merge
21
commits into
master
Choose a base branch
from
moduleExperiment
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…adle for modules missing one
… do. - Upgrades to Gradle 3.3 from 2.10 - Removes the need for module directories to have a build.gradle - Related cleanup / simplification of scripts - Bakes in support for alternative module languages into new /modules Gradle scripts via new "language" property in module.txt
…hink it was something like ... - removes the IDE configurations :-( - tries to find a hook for a prep task (to extract natives, code analysis config, and copy templates) - fixes a Gradle structure / resolution performance issue - adds the Groovy Wrapper that I since added to the main project so this one is already out of date
…tter and bring in the latest module utility
…isn't present here but there is still a dependency quirk that causes modules to end up depending on a snapshot of the engine rather than local engine src, so Gradle included the telemetry dependency from the jar and then couldn't find it (as it exists in a separate artifact repository)
… in pure Gradle, it makes IntelliJ barf with an unintelligible error on a Gradle refresh. However, oddly, the same exact thing on a testCompile instead of a regular compile source set works fine.
…le knows where to find it if needed via module->engine snapshot quirk
…anage to erase them accidentally again. Includes Gradle 4 and some related changes.
… in moved files yet.
…rking in a standalone module workspace. Should clean up later, the Artifactory block is all over the place now. Must be a way to shrink that down.
Seems to let the unit tests in Pathfinding work out the directory, but then a module sandboxing quirk appears?
Jenkins Failure Message |
Cervator
force-pushed
the
master
branch
2 times, most recently
from
March 30, 2020 06:02
7fdd7f5
to
ba1eb80
Compare
Cervator
force-pushed
the
master
branch
2 times, most recently
from
January 16, 2021 23:12
dd0dd1d
to
6f32a99
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Setting up PR for easier overview and to have somewhere to put notes. Note that this is just very recent work, there is other new stuff in this fork prior to this PR, and somehow this repo is already 800 commits behind upstream, sigh :-) (note: master is effectively my develop here ... err, yeah. It could be clearer)
The main goal to this piece is reorganizing some of the Gradle and template file stuff to both make things cleaner (collapsed two dirs into
/gradle
that won't be interesting to most users) and to allow an easy way to assemble a build harness zip that can be dumped on a standalone module directory to allow it to build using the exact same build files.The reasoning behind that is two-fold:
groovyw module init
will initialize the build harness as a module dir, name taken by the parent dir. Add assets + code,gradlew jar
, copy jar into regular game module dir or share it with a friendIt may even be possible to include a command that'll run the game right out of a standalone module directory. After all the Gradle already depends on the engine jar and so on. So it might be possible to not even have a full game dir, just whatever Gradle fetches from Artifactory
One additional major issue is being experimentally addressed: when a solo module build does run it tends to fail if there are environment-based unit tests present, because execution ends up starting in the Gradle cache. I came up with a check for
PathManager
that seems to get you back to the module dir, and the process now gets past that part, but oddly seems to fail on some module sandbox setup issue now. Am curious if @kaen or @oniatus might have a clue there.Note that to run this I recommend a separate workspace - do not try this at home (in your regular workspace) :D
The
gradle.properties
in the template dir may be needed to make sure configuration on demand is off. I'm working split away from the regular MovingBlocks and Terasology orgs, in Artifactory as well. One other issue is that modules retrieved from Artifactory will tend to come with a dependency on a specific version of the engine, which can make it harder to test things when you have related changes in a local source engine. I've got some clues on how to fix that as well but in the meantime have used bumping the engine version to 1.6.1 then usinggradlew engine:install
to get a newer version in my local cache that'll get used instead of something from Artifactory without my changes.Right now this just works in Gradle. I had clues to fix IntelliJ but it brings a lot of hassle, in particular without any sort of IntelliJ customizations (just standard Gradle stuff)
Next up I'll be testing this in Jenkins with new pipelines. Lots of stuff still to do but it is looking promising.