-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e830353
commit 8b21978
Showing
11 changed files
with
957 additions
and
243 deletions.
There are no files selected for viewing
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
19 changes: 19 additions & 0 deletions
19
.../main/groovy/net/neoforged/gradle/dsl/platform/dynamic/NeoFormProjectConfiguration.groovy
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package net.neoforged.gradle.dsl.platform.dynamic | ||
|
||
import groovy.transform.CompileStatic | ||
import net.minecraftforge.gdi.ConfigurableDSLElement | ||
import net.minecraftforge.gdi.annotations.DSLProperty | ||
import org.gradle.api.provider.Property | ||
|
||
/** | ||
* Represents the configuration for a NeoForm dynamic project. | ||
*/ | ||
@CompileStatic | ||
abstract class NeoFormProjectConfiguration implements ConfigurableDSLElement<NeoFormProjectConfiguration> { | ||
|
||
/** | ||
* @return True if the source sets should be split based on distribution, false otherwise. | ||
*/ | ||
@DSLProperty | ||
abstract Property<Boolean> getSplitSourceSets(); | ||
} |
55 changes: 55 additions & 0 deletions
55
.../main/groovy/net/neoforged/gradle/dsl/platform/dynamic/RuntimeProjectConfiguration.groovy
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package net.neoforged.gradle.dsl.platform.dynamic | ||
|
||
import groovy.transform.CompileStatic | ||
import net.minecraftforge.gdi.BaseDSLElement | ||
import net.minecraftforge.gdi.ConfigurableDSLElement | ||
import net.minecraftforge.gdi.annotations.DSLProperty | ||
import org.gradle.api.Project | ||
import org.gradle.api.file.DirectoryProperty | ||
import org.gradle.api.provider.Property | ||
import org.gradle.api.tasks.Optional | ||
|
||
import javax.inject.Inject | ||
|
||
@CompileStatic | ||
abstract class RuntimeProjectConfiguration implements BaseDSLElement<RuntimeProjectConfiguration> { | ||
|
||
private final Project project | ||
|
||
@Inject | ||
RuntimeProjectConfiguration(Project project) { | ||
this.project = project | ||
} | ||
|
||
Project getProject() { | ||
return project | ||
} | ||
|
||
@DSLProperty | ||
abstract Property<String> getNeoFormVersion() | ||
|
||
/** | ||
* @return The directory containing the patches to apply to the project. | ||
*/ | ||
@DSLProperty | ||
abstract DirectoryProperty getPatches() | ||
|
||
/** | ||
* @return The directory containing the rejects from applying patches to the project. | ||
*/ | ||
@DSLProperty | ||
abstract DirectoryProperty getRejects() | ||
|
||
/** | ||
* @return The directory containing the legacy patches to migrate when split source sets are enabled. | ||
*/ | ||
@Optional | ||
@DSLProperty | ||
abstract DirectoryProperty getLegacyPatches() | ||
|
||
/** | ||
* @return True if the source sets should be split based on distribution, false otherwise. | ||
*/ | ||
@DSLProperty | ||
abstract Property<Boolean> getSplitSourceSets(); | ||
} |
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
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
Oops, something went wrong.