Browse Source

Try to make Gradle build work

Add a dependency that is reported as missing locally with JDK 11
Combine common test-dependencies
Avoid running base-class BaseTestMissingWorkbook, only the derived class is actually a unit-test

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885074 13f79535-47bb-0310-9956-ffa450edef68
tags/REL_5_0_0
Dominik Stadler 3 years ago
parent
commit
43e1d6eba6

+ 7
- 12
build.gradle View File

japicmpversion = '4.1.2' japicmpversion = '4.1.2'
junitVersion = '5.7.0' junitVersion = '5.7.0'
mockitoVersion = '3.6.0' mockitoVersion = '3.6.0'
hamcrestVersion = '2.2'
slf4jVersion = '1.7.30' slf4jVersion = '1.7.30'
xmlbeansVersion = '4.0.0' xmlbeansVersion = '4.0.0'
} }
} }
} }


dependencies {
testCompile "org.junit.jupiter:junit-jupiter:${junitVersion}"
testCompile "org.mockito:mockito-core:${mockitoVersion}"
testCompile "org.hamcrest:hamcrest:${hamcrestVersion}"
}

jar { jar {
manifest { manifest {
attributes 'Implementation-Title': 'Apache POI', 'Implementation-Version': version attributes 'Implementation-Title': 'Apache POI', 'Implementation-Version': version
compile 'javax.activation:activation:1.1.1' compile 'javax.activation:activation:1.1.1'
compile 'com.zaxxer:SparseBitSet:1.2' compile 'com.zaxxer:SparseBitSet:1.2'


testCompile "org.junit.jupiter:junit-jupiter:${junitVersion}"
testCompile "org.mockito:mockito-core:${mockitoVersion}"
testCompile 'org.reflections:reflections:0.9.12' testCompile 'org.reflections:reflections:0.9.12'
testRuntime "org.slf4j:slf4j-simple:${slf4jVersion}" testRuntime "org.slf4j:slf4j-simple:${slf4jVersion}"

testCompile 'org.hamcrest:hamcrest:2.2'
} }


jar { jar {
compile project(':scratchpad') // TODO: get rid of this dependency! compile project(':scratchpad') // TODO: get rid of this dependency!
compile files("../../build/dist/maven/poi-ooxml-full/poi-ooxml-full-${version}.jar") compile files("../../build/dist/maven/poi-ooxml-full/poi-ooxml-full-${version}.jar")


testCompile "org.junit.jupiter:junit-jupiter:${junitVersion}"
testCompile "org.mockito:mockito-core:${mockitoVersion}"
testCompile 'org.xmlunit:xmlunit-core:2.8.0' testCompile 'org.xmlunit:xmlunit-core:2.8.0'
testCompile 'org.reflections:reflections:0.9.12' testCompile 'org.reflections:reflections:0.9.12'
testCompile project(path: ':main', configuration: 'tests') testCompile project(path: ':main', configuration: 'tests')
compile project(':ooxml') compile project(':ooxml')


testCompile project(path: ':main', configuration: 'tests') testCompile project(path: ':main', configuration: 'tests')
testCompile "org.junit.jupiter:junit-jupiter:${junitVersion}"
testCompile 'org.hamcrest:hamcrest:2.2'
} }


jar { jar {
compile project(':scratchpad') compile project(':scratchpad')
compile project(':examples') compile project(':examples')


testCompile "org.junit.jupiter:junit-jupiter:${junitVersion}"

testCompile "org.apache.xmlbeans:xmlbeans:${xmlbeansVersion}" testCompile "org.apache.xmlbeans:xmlbeans:${xmlbeansVersion}"


testCompile files("../../build/dist/maven/poi-ooxml-full/poi-ooxml-full-${version}.jar") testCompile files("../../build/dist/maven/poi-ooxml-full/poi-ooxml-full-${version}.jar")


// cyclic-dependency here: compile project(':ooxml') // cyclic-dependency here: compile project(':ooxml')


testCompile "org.junit.jupiter:junit-jupiter:${junitVersion}"
testCompile "org.mockito:mockito-core:${mockitoVersion}"
testCompile project(path: ':main', configuration: 'tests') testCompile project(path: ':main', configuration: 'tests')
} }



+ 1
- 5
src/testcases/org/apache/poi/ss/formula/BaseTestMissingWorkbook.java View File

import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;


public class BaseTestMissingWorkbook {
public abstract class BaseTestMissingWorkbook {
protected Workbook mainWorkbook; protected Workbook mainWorkbook;
protected Workbook sourceWorkbook; protected Workbook sourceWorkbook;


protected final String SOURCE_DUMMY_WORKBOOK_FILENAME; protected final String SOURCE_DUMMY_WORKBOOK_FILENAME;
protected final String SOURCE_WORKBOOK_FILENAME; protected final String SOURCE_WORKBOOK_FILENAME;


public BaseTestMissingWorkbook() {
this("52575_main.xls", "source_dummy.xls", "52575_source.xls");
}

protected BaseTestMissingWorkbook(String MAIN_WORKBOOK_FILENAME, protected BaseTestMissingWorkbook(String MAIN_WORKBOOK_FILENAME,
String SOURCE_DUMMY_WORKBOOK_FILENAME, String SOURCE_WORKBOOK_FILENAME) { String SOURCE_DUMMY_WORKBOOK_FILENAME, String SOURCE_WORKBOOK_FILENAME) {
this.MAIN_WORKBOOK_FILENAME = MAIN_WORKBOOK_FILENAME; this.MAIN_WORKBOOK_FILENAME = MAIN_WORKBOOK_FILENAME;

Loading…
Cancel
Save