diff options
Diffstat (limited to 'ooxml-schema/build.gradle')
-rw-r--r-- | ooxml-schema/build.gradle | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/ooxml-schema/build.gradle b/ooxml-schema/build.gradle new file mode 100644 index 0000000000..68aa790fcf --- /dev/null +++ b/ooxml-schema/build.gradle @@ -0,0 +1,70 @@ +/* ==================================================================== + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +==================================================================== */ + +apply plugin: 'java' + +configurations { + antdep +} + +dependencies { + antdep 'org.apache.ant:ant:1.10.9' +} + +/*task downloadJarsToLibs() { + def f = new File("$projectDir/../lib/ooxml/xmlbeans-5.0.0.jar") + if (!f.exists()) { + println 'writing file ' + f.getAbsolutePath() + f.getParentFile().mkdirs() + new URL('https://ci-builds.apache.org/job/POI/job/POI-XMLBeans-DSL-1.8/lastSuccessfulBuild/artifact/build/xmlbeans-5.0.0.jar').withInputStream{ i -> f.withOutputStream{ it << i }} + } +}*/ + +// we need to ensure that the custom ant tasks are compiled before we import the build.xml file + +task compileContrib (type: JavaCompile) { + source = "../excelant/src/poi-ant-contrib/java" + include '*.java' + exclude 'Junit5Progress.java' + classpath = configurations.antdep + destinationDirectory = file('../excelant/build/poi-ant-contrib') +} + + +// for now import the ant-task for building the jars from build.xml +// we need to rename the tasks as e.g. task "jar" conflicts with :ooxml:jar + +ant.importBuild('../build.xml') { antTargetName -> + 'ant-' + antTargetName +} + +compileJava.dependsOn 'compileContrib' +compileJava.dependsOn 'ant-compile-ooxml-xsds' + +//compileJava.dependsOn 'downloadJarsToLibs' + +dependencies { + api "org.apache.xmlbeans:xmlbeans:${xmlbeansVersion}" +} + +jar { + manifest { + attributes 'Automatic-Module-Name': 'org.apache.poi.ooxml.schemas' + } +} + +japicmp.baseline = "org.apache.poi:poi:${japicmpversion}@jar" |