Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

Commit

Permalink
Update run environment and add extra documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
amadornes committed Jun 3, 2022
1 parent 8635d86 commit 78c5159
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 23 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ You must run that project's `gen<IDE>Runs` task and use its classpath at runtime

For datagen, you may still use each project's individual runs.

## Known issues and currently untested features
## Known issues
Please check the [runenv template](https://github.com/amadornes/fg-multiproject-runenv) repository, as that will contain
the latest information regarding compatibility. Further updates will most likely be pushed there.
the latest information regarding compatibility.

## Contributions
Pull requests adding extended feature support and bugfixes are welcome.
Expand Down
56 changes: 36 additions & 20 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,26 +1,42 @@
plugins {
id("org.jetbrains.gradle.plugin.idea-ext") version "1.1"
}

subprojects {
configurations.all {
if (it.name.startsWith("_")) {
exclude group: "com.example", module: "examplelib"
return
}

resolutionStrategy.dependencySubstitution {
substitute module("com.example:examplelib") using project(":examplelib")
}
}
configurations.all {
if (it.name.startsWith("_")) {
// You must exclude the same modules you substitute here, because ForgeGradle
exclude group: "com.example", module: "examplelib"
return
}

resolutionStrategy.dependencySubstitution {
// Apply substitutions for modules your projects depend on, replacing them with another project
substitute module("com.example:examplelib") using project(":examplelib")
}
}
}

project('runenv') {
ext {
mcversion = '1.17.1'
forgeversion = '37.0.13'
}
repositories {
}
dependencies {
// This is where any additional runtime dependencies for your dev environment go
}
ext {
mcversion = '1.18.2'
forgeversion = '40.1.31'
// javaversion = 17 // Defaults to 17 already
// mappings = channel: 'official', version: '1.18.2' // Defaults to mojmap for the specified MC version
// runArgs = [ ] // Arguments applied to all runs
// runProps = [ name: value ] // Properties applied to all runs
}
repositories {
// Repositories for additional runtime dependencies go here
}
afterEvaluate {
dependencies {
// This is where any additional runtime dependencies for your dev environment go
}
}
}


// Ensure the run directory is excluded from the idea module
idea.module {
excludeDirs << file("run")
}
2 changes: 1 addition & 1 deletion runenv
Submodule runenv updated 2 files
+22 −4 README.md
+49 −7 build.gradle
2 changes: 2 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
rootProject.name = 'Multiproject' // Optionally set a custom name for the root

// This is where all the projects in this environment are registered
// Use the relative path to the directory where their buildscript is in your includes
include 'examplelib'
include 'examplemod'

Expand Down

0 comments on commit 78c5159

Please sign in to comment.