Added gradle plugin for version building

This commit is contained in:
Georgy Litvinov 2020-07-01 17:19:39 +02:00
parent 8acf77c143
commit adefad19df
3 changed files with 26 additions and 19 deletions

View file

@ -1,4 +1,6 @@
def releaseVersion = "0.7.14"
task oxt(type: Zip) {
dependsOn = [ 'setVersion' ]
from './'
include '*'
include '*/*'
@ -12,3 +14,11 @@ task oxt(type: Zip) {
exclude 'cleanAndValidate.ox2'
archiveName 'cleanAndValidate.oxt'
}
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: "${releaseVersion}")
}
}

BIN
buildPlugins/xmltask.jar Normal file

Binary file not shown.

View file

@ -1,40 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<description xmlns="http://openoffice.org/extensions/description/2006"
xmlns:dep="http://openoffice.org/extensions/description/2006"
xmlns:xlink="http://www.w3.org/1999/xlink">
<identifier value="pro.litvinovg.Redaction" />
<version value="0.7.14" />
<platform value="all" />
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<description xmlns="http://openoffice.org/extensions/description/2006" xmlns:dep="http://openoffice.org/extensions/description/2006" xmlns:xlink="http://www.w3.org/1999/xlink">
<identifier value="pro.litvinovg.Redaction"/>
<version value="0.7.14"/>
<platform value="all"/>
<display-name>
<name lang="en">Cleaning and validation documents for publishing in html and epub with pagination</name>
<name lang="ru">Чистка и проверка документов для издания в html и epub с сохранением пагинации</name>
</display-name>
<registration>
<simple-license accept-by="admin" suppress-on-update="true" suppress-if-required="true" >
<license-text xlink:href="license_en.txt" lang="en" />
<license-text xlink:href="license_ru.txt" lang="ru" />
<simple-license accept-by="admin" suppress-if-required="true" suppress-on-update="true">
<license-text lang="en" xlink:href="license_en.txt"/>
<license-text lang="ru" xlink:href="license_ru.txt"/>
</simple-license>
</registration>
<dependencies>
<OpenOffice.org-minimal-version value="4.1" dep:name="OpenOffice.org, LibreOffice 4.1 or later" />
<OpenOffice.org-minimal-version dep:name="OpenOffice.org, LibreOffice 4.1 or later" value="4.1"/>
</dependencies>
<update-information>
<src xlink:href="https://dev.litvinovg.pro/litvinovg/cleanandvalidate/-/raw/master/cleanandvalidate.update.xml" />
<src xlink:href="https://dev.litvinovg.pro/litvinovg/cleanandvalidate/-/raw/master/cleanandvalidate.update.xml"/>
</update-information>
<publisher>
<name xlink:href="mailto:public@litvinovg.pro" lang="en">Georgy Litvinov</name>
<name lang="en" xlink:href="mailto:public@litvinovg.pro">Georgy Litvinov</name>
</publisher>
<release-notes>
<src xlink:href="releasenotes.txt" lang="en" />
<src lang="en" xlink:href="releasenotes.txt"/>
</release-notes>
<extension-description>
<src xlink:href="description/description_ru.txt" lang="ru" />
<src xlink:href="description/description_en.txt" lang="en" />
<src lang="ru" xlink:href="description/description_ru.txt"/>
<src lang="en" xlink:href="description/description_en.txt"/>
</extension-description>
<icon>
<default xlink:href="icons/addon_icon.png" />
<high-contrast xlink:href="icons/addon_icon.png" />
<default xlink:href="icons/addon_icon.png"/>
<high-contrast xlink:href="icons/addon_icon.png"/>
</icon>
</description>