-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Transform decompile step into a task that is customizable via specifi…
…c settings.
- Loading branch information
Showing
6 changed files
with
157 additions
and
6 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
21 changes: 21 additions & 0 deletions
21
.../src/main/java/net/neoforged/gradle/common/extensions/subsystems/SubsystemsExtension.java
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,21 @@ | ||
package net.neoforged.gradle.common.extensions.subsystems; | ||
|
||
import net.minecraftforge.gdi.ConfigurableDSLElement; | ||
import net.neoforged.gradle.dsl.common.extensions.subsystems.Subsystems; | ||
import org.gradle.api.Project; | ||
|
||
import javax.inject.Inject; | ||
|
||
public abstract class SubsystemsExtension implements ConfigurableDSLElement<Subsystems>, Subsystems { | ||
private final Project project; | ||
|
||
@Inject | ||
public SubsystemsExtension(Project project) { | ||
this.project = project; | ||
} | ||
|
||
@Override | ||
public Project getProject() { | ||
return project; | ||
} | ||
} |
52 changes: 52 additions & 0 deletions
52
...n/src/main/groovy/net/neoforged/gradle/dsl/common/extensions/subsystems/Decompiler.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,52 @@ | ||
package net.neoforged.gradle.dsl.common.extensions.subsystems | ||
|
||
import groovy.transform.CompileStatic | ||
import net.minecraftforge.gdi.ConfigurableDSLElement | ||
import net.minecraftforge.gdi.annotations.DSLProperty | ||
import org.gradle.api.provider.ListProperty | ||
import org.gradle.api.provider.Property | ||
import org.gradle.api.tasks.Input | ||
import org.gradle.api.tasks.Optional | ||
|
||
/** | ||
* Allows configuration of the decompiler used by NeoGradle. | ||
*/ | ||
@CompileStatic | ||
interface Decompiler extends ConfigurableDSLElement<Decompiler> { | ||
|
||
/** | ||
* Allows the maximum memory provided to the decompiler to be overridden. Must be specified | ||
* in the "123g" or "123m" form. | ||
*/ | ||
@Input | ||
@Optional | ||
@DSLProperty | ||
Property<String> getMaxMemory(); | ||
|
||
/** | ||
* Allows the maximum number of threads used by the decompiler to be constrained. By default, it will | ||
* use all available threads. | ||
*/ | ||
@Input | ||
@Optional | ||
@DSLProperty | ||
Property<Integer> getMaxThreads(); | ||
|
||
/** | ||
* The log-level to use for the decompiler. Supported values: info, debug, warn, error. | ||
* Defaults to info. | ||
*/ | ||
@Input | ||
@Optional | ||
@DSLProperty | ||
Property<String> getLogLevel(); | ||
|
||
/** | ||
* Allows additional JVM arguments to be added to the decompiler invocation. | ||
*/ | ||
@Input | ||
@Optional | ||
@DSLProperty | ||
ListProperty<String> getJvmArgs(); | ||
|
||
} |
21 changes: 21 additions & 0 deletions
21
...n/src/main/groovy/net/neoforged/gradle/dsl/common/extensions/subsystems/Subsystems.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,21 @@ | ||
package net.neoforged.gradle.dsl.common.extensions.subsystems | ||
|
||
import groovy.transform.CompileStatic | ||
import net.minecraftforge.gdi.BaseDSLElement | ||
import net.minecraftforge.gdi.annotations.DSLProperty | ||
import org.gradle.api.tasks.Nested | ||
|
||
/** | ||
* Allows configuration of various NeoGradle subsystems. | ||
*/ | ||
@CompileStatic | ||
interface Subsystems extends BaseDSLElement<Subsystems> { | ||
|
||
/** | ||
* @return Settings for the decompiler subsystem. | ||
*/ | ||
@Nested | ||
@DSLProperty | ||
Decompiler getDecompiler(); | ||
|
||
} |
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