Skip to content

Commit

Permalink
build: Add Gradle task to assemble module build harness
Browse files Browse the repository at this point in the history
  • Loading branch information
skaldarnar committed Sep 4, 2023
1 parent 43a7e05 commit 312c4bd
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -282,3 +282,54 @@ idea {
cleanIdea.doLast {
new File('Terasology.iws').delete()
}

// A task to assemble various files into a single zip for distribution as 'build-harness.zip' for module builds
task assembleBuildHarness(type: Zip) {
description 'Assembles a zip of files useful for module development'

dependsOn extractNatives
from('natives'){
include '**/*'
// TODO: use output of extractNatives?

Check warning on line 293 in build.gradle

View check run for this annotation

Terasology Jenkins.io / Open Tasks Scanner

TODO

NORMAL: use output of extractNatives?
// TODO: which module needs natives to build?

Check warning on line 294 in build.gradle

View check run for this annotation

Terasology Jenkins.io / Open Tasks Scanner

TODO

NORMAL: which module needs natives to build?
into 'natives'
}

dependsOn extractConfig
from('config'){
//include 'gradle/**/*', 'metrics/**/*'
include '**/*'
// TODO: depend on output of extractConfig?

Check warning on line 302 in build.gradle

View check run for this annotation

Terasology Jenkins.io / Open Tasks Scanner

TODO

NORMAL: depend on output of extractConfig?
into 'config'
}

from('gradle'){
include '**/*' // include all files in 'gradle'
// TODO: exclude groovy jar?

Check warning on line 308 in build.gradle

View check run for this annotation

Terasology Jenkins.io / Open Tasks Scanner

TODO

NORMAL: exclude groovy jar?
into 'gradle'
}

from('build-logic'){
include 'src/**', '*.kts'
into 'build-logic'
}

from('templates') {
include 'build.gradle'
}

from('.') {
include 'gradlew'
}

// include file 'templates/module.logback-test.xml' as 'src/test/resources/logback-test.xml'
from('templates'){
include 'module.logback-test.xml'
rename 'module.logback-test.xml', 'logback-test.xml'
into 'src/test/resources'
}

// set the archive name
archiveFileName.set('build-harness.zip')
}

0 comments on commit 312c4bd

Please sign in to comment.