mirror of
https://github.com/FabricMC/fabric
synced 2026-08-19 06:26:07 -04:00
Small buildscript tweaks & fixes (#4584)
* Small buildscript tweaks
* Fix CI builds on branches containing a /
* Fix running without Gradle.
(cherry picked from commit 112e550e7e)
This commit is contained in:
parent
c1dce2181f
commit
e042dd4188
3 changed files with 7 additions and 5 deletions
|
|
@ -9,7 +9,7 @@ plugins {
|
|||
}
|
||||
|
||||
def branchProvider = providers.of(GitBranchValueSource.class) {}
|
||||
version = project.version + "+" + (providers.environmentVariable("CI").present ? branchProvider.get() : "local")
|
||||
version = project.version + "+" + (providers.environmentVariable("CI").present ? branchProvider.get().replace("/", "_") : "local")
|
||||
logger.lifecycle("Building Fabric: " + version)
|
||||
|
||||
def metaProjects = [
|
||||
|
|
@ -115,7 +115,7 @@ allprojects {
|
|||
apply plugin: "maven-publish"
|
||||
apply plugin: "me.modmuss50.remotesign"
|
||||
|
||||
tasks.withType(GenerateModuleMetadata) {
|
||||
tasks.withType(GenerateModuleMetadata).configureEach {
|
||||
enabled = false
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* This task should be used to easily bump the major/minor/patch version of a fabric-api module.
|
||||
* It will automatically bump the versions of dependent modules.
|
||||
*/
|
||||
task bumpVersions(type: BumpVersionTask)
|
||||
tasks.register('bumpVersions', BumpVersionTask)
|
||||
|
||||
class BumpVersionTask extends DefaultTask {
|
||||
BumpVersionTask() {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
task validateAnnotations(type: ValidateAnnotations) {
|
||||
tasks.register('validateAnnotations', ValidateAnnotations) {
|
||||
group = 'fabric'
|
||||
description = "Validate annotations used in Fabric API code."
|
||||
|
||||
outputs.upToDateWhen { true } // Task has no outputs
|
||||
|
||||
// Only apply to default source directories since there's also generated package-info files.
|
||||
source file("src/client/java")
|
||||
source file("src/main/java")
|
||||
|
|
@ -9,7 +11,7 @@ task validateAnnotations(type: ValidateAnnotations) {
|
|||
source file("src/testmodClient/java")
|
||||
}
|
||||
|
||||
tasks.check.dependsOn validateAnnotations
|
||||
tasks.check.dependsOn "validateAnnotations"
|
||||
|
||||
class ValidateAnnotations extends SourceTask {
|
||||
private static final def API_STATUS_INTERNAL = ~/@ApiStatus\.Internal/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue