aboutsummaryrefslogtreecommitdiffstats
path: root/ooxml-schema/build.gradle
blob: 68aa790fcfca4eacdb3d2c1909d865339e5c59a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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"