cleanandvalidate/build.gradle
2021-09-13 19:51:11 +02:00

31 lines
1.1 KiB
Groovy

apply plugin: 'java'
task oxt(type: Zip) {
dependsOn = [ 'setVersion','setVersionInBasicCode' ]
archiveFileName = 'cleanAndValidate.oxt'
destinationDirectory = file("./")
from './'
include '*'
include '*/*'
include '*/*/*'
include '*/*/*/*'
exclude 'cleanAndValidate.oxt'
exclude '.*'
exclude 'build.gradle'
exclude 'translations.ods'
exclude 'build'
exclude 'buildPlugins'
exclude 'cleanandvalidate.update.xml'
exclude 'cleanAndValidate.ox2'
}
task setVersion(){
ant.taskdef(name: 'xmltask', classpath: 'buildPlugins/xmltask.jar', classname: 'com.oopsconsultancy.xmltask.ant.XmlTask')
ant.xmltask(source: 'description.xml', dest: 'description.xml', report:'true') {
replace(path: "//*[local-name()='version']/@value", withText: "${project.version}")
}
}
task setVersionInBasicCode {
ant.replaceregexp(match:'redactionExtensionVersion = ".*"', replace:"redactionExtensionVersion = "${project.version}"", flags:'g', byline:true) {
fileset(dir: 'Redaction', includes: 'Configuration.xba')
}
}