Browse Source

[github-183] Fix gradle build. Thanks to Eugene Kortov. This close #183

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1878202 13f79535-47bb-0310-9956-ffa450edef68
tags/before_ooxml_3rd_edition
PJ Fanning 4 years ago
parent
commit
682a17bf57
1 changed files with 34 additions and 34 deletions
  1. 34
    34
      build.gradle

+ 34
- 34
build.gradle View File

classpath: configurations.antLibs.asPath) classpath: configurations.antLibs.asPath)


wrapper { wrapper {
gradleVersion = '6.1.1'
gradleVersion = '6.1.1'
} }


task adjustWrapperPropertiesFile { task adjustWrapperPropertiesFile {
doLast {
ant.replaceregexp(match:'^#.*', replace:'', flags:'g', byline:true) {
fileset(dir: project.projectDir, includes: 'gradle/wrapper/gradle-wrapper.properties')
}
new File(project.projectDir, 'gradle/wrapper/gradle-wrapper.properties').with { it.text = it.readLines().findAll { it }.sort().join('\n') }
ant.fixcrlf(file: 'gradle/wrapper/gradle-wrapper.properties', eol: 'lf')
}
doLast {
ant.replaceregexp(match:'^#.*', replace:'', flags:'g', byline:true) {
fileset(dir: project.projectDir, includes: 'gradle/wrapper/gradle-wrapper.properties')
}
new File(project.projectDir, 'gradle/wrapper/gradle-wrapper.properties').with { it.text = it.readLines().findAll { it }.sort().join('\n') }
ant.fixcrlf(file: 'gradle/wrapper/gradle-wrapper.properties', eol: 'lf')
}
} }
wrapper.finalizedBy adjustWrapperPropertiesFile wrapper.finalizedBy adjustWrapperPropertiesFile


/** /**


Define properties for all projects, including this one
Define properties for all projects, including this one


*/
*/
allprojects { allprojects {
apply plugin: 'eclipse' apply plugin: 'eclipse'
} }


/** /**


Define things that are only necessary in sub-projects, but not in the master-project itself
Define things that are only necessary in sub-projects, but not in the master-project itself


*/
*/
subprojects { subprojects {
//Put instructions for each sub project, but not the master //Put instructions for each sub project, but not the master
apply plugin: 'java' apply plugin: 'java'


compile project(':main') compile project(':main')
compile project(':scratchpad') // TODO: get rid of this dependency! compile project(':scratchpad') // TODO: get rid of this dependency!
compile files('../../ooxml-lib/ooxml-schemas-1.4.jar')
compile files('../../ooxml-lib/ooxml-security-1.1.jar')
compile files('../../lib/ooxml/ooxml-schemas-1.4.jar')
compile files('../../lib/ooxml/ooxml-security-1.1.jar')


testCompile "junit:junit:${junitVersion}" testCompile "junit:junit:${junitVersion}"
testCompile "org.mockito:mockito-core:${mockitoVersion}" testCompile "org.mockito:mockito-core:${mockitoVersion}"


japicmp.baseline = "org.apache.poi:poi:${japicmpversion}@jar" japicmp.baseline = "org.apache.poi:poi:${japicmpversion}@jar"


test {
test {
// for some reason catching the OOM does not work when run from Gradle // for some reason catching the OOM does not work when run from Gradle
exclude '**/MemoryUsage.class' exclude '**/MemoryUsage.class'
} }
compile project(':ooxml') compile project(':ooxml')
compile project(':scratchpad') compile project(':scratchpad')
compile "org.apache.xmlbeans:xmlbeans:${xmlbeansVersion}" compile "org.apache.xmlbeans:xmlbeans:${xmlbeansVersion}"
compile files('../../ooxml-lib/ooxml-schemas-1.4.jar')
compile files('../../lib/ooxml/ooxml-schemas-1.4.jar')
compile "org.apache.commons:commons-compress:${commonsCompressVersion}" compile "org.apache.commons:commons-compress:${commonsCompressVersion}"
} }


testCompile "junit:junit:${junitVersion}" testCompile "junit:junit:${junitVersion}"
} }


jar {
manifest {
attributes 'Automatic-Module-Name': 'org.apache.poi.excelant'
}
}
jar {
manifest {
attributes 'Automatic-Module-Name': 'org.apache.poi.excelant'
}
}


japicmp.baseline = "org.apache.poi:poi-excelant:${japicmpversion}@jar" japicmp.baseline = "org.apache.poi:poi-excelant:${japicmpversion}@jar"
} }


testCompile "junit:junit:${junitVersion}" testCompile "junit:junit:${junitVersion}"
testCompile "org.apache.xmlbeans:xmlbeans:${xmlbeansVersion}" testCompile "org.apache.xmlbeans:xmlbeans:${xmlbeansVersion}"
testCompile files('../../ooxml-lib/ooxml-schemas-1.4.jar')
testCompile files('../../lib/ooxml/ooxml-schemas-1.4.jar')
} }


jar {
manifest {
attributes 'Automatic-Module-Name': 'org.apache.poi.integrationtest'
}
}
jar {
manifest {
attributes 'Automatic-Module-Name': 'org.apache.poi.integrationtest'
}
}


test {
test {
// exclude these from the normal test-run // exclude these from the normal test-run
exclude '**/TestAllFiles.class' exclude '**/TestAllFiles.class'
exclude '**/*FileHandler.class' exclude '**/*FileHandler.class'
testCompile project(path: ':main', configuration: 'tests') testCompile project(path: ':main', configuration: 'tests')
} }


jar {
manifest {
attributes 'Automatic-Module-Name': 'org.apache.poi.scratchpad'
}
}
jar {
manifest {
attributes 'Automatic-Module-Name': 'org.apache.poi.scratchpad'
}
}


japicmp.baseline = "org.apache.poi:poi:${japicmpversion}@jar" japicmp.baseline = "org.apache.poi:poi:${japicmpversion}@jar"
}
}

Loading…
Cancel
Save