allprojects { apply(plugin: 'java') apply(plugin: 'idea') sourceCompatibility = '1.8' targetCompatibility = '1.8' } def projectName = "YARG (Yet another report generator)" def projectDescription = "Open source library for report generation. Provided by Haulmont." def projectUrl = "https://github.com/cuba-platform/yarg" def artifactVersion = '2.2-SNAPSHOT' if (rootProject.hasProperty('buildVersion')) { artifactVersion = rootProject['buildVersion'] } def isSnapshot = artifactVersion.endsWith('-SNAPSHOT') def api = project(':yarg-api') def core = project(':yarg') def console = project(':yarg-console') def server = project(':yarg-server') def repositoryUser = System.getenv('HAULMONT_REPOSITORY_USER') def repositoryPassword, repositoryUrl, workRepositoryUrl if (repositoryUser) {//for internal users repositoryPassword = System.getenv('HAULMONT_REPOSITORY_PASSWORD') repositoryUrl = 'http://repository.haulmont.com:8587/nexus/content' workRepositoryUrl = "$repositoryUrl/groups/work" } else {//for external users repositoryUser = 'cuba' repositoryPassword = 'cuba123' repositoryUrl = 'https://repo.cuba-platform.com/content' workRepositoryUrl = "$repositoryUrl/groups/work" } configure([api, core, console, server]) { apply(plugin: 'maven') apply(plugin: 'signing') group = 'com.haulmont.yarg' version = artifactVersion repositories { mavenCentral() maven { credentials { username repositoryUser password repositoryPassword } url workRepositoryUrl } } sourceSets { main { java { srcDir 'src' } resources { srcDir 'src' } } test { java { srcDir 'test' } resources { srcDir 'test' } } } configurations { deployerJars sourceArchives } dependencies { deployerJars(group: 'org.apache.maven.wagon', name: 'wagon-http', version: '1.0-beta-2') } task sourceJar(type: Jar) { from sourceSets.main.java classifier = 'sources' } task javadocJar(type: Jar, dependsOn: javadoc) { classifier = 'javadoc' from javadoc.destinationDir } artifacts { archives sourceJar archives javadocJar } if (signing.hasProperty('keyId')) { signing { sign configurations.archives } } uploadArchives.configure { repositories.mavenDeployer { name = 'httpDeployer' configuration = configurations.deployerJars // beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } // // repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { // authentication(userName: "$oss_login", password: "$oss_password") // } repository(url: "$repositoryUrl/repositories/" + (isSnapshot ? 'snapshots' : 'releases')) { authentication(userName: repositoryUser, password: repositoryPassword) } pom.project { name = "$projectName" description = "$projectDescription" url = "$projectUrl" developers { developer { id 'tinhol' email 'tinhol@mail.ru' organization = 'Haulmont' organizationUrl 'http://www.haulmont.com/' } } scm { connection = "$projectUrl" url = "$projectUrl" } licenses { license { name 'The Apache Software License, Version 2.0' url 'http://www.apache.org/licenses/LICENSE-2.0.txt' distribution 'repo' } } } } } install.configure { repositories.mavenInstaller { pom.project { name = "$projectName" description = "$projectDescription" url = "$projectUrl" developers { developer { id 'tinhol' email 'tinhol@mail.ru' organization = 'Haulmont' organizationUrl 'http://www.haulmont.com/' } } scm { connection = "$projectUrl" url = "$projectUrl" } licenses { license { name 'The Apache Software License, Version 2.0' url 'http://www.apache.org/licenses/LICENSE-2.0.txt' distribution 'repo' } } } } } } configure(api) { } configure(core) { assemble { new File("result").mkdir() new File("result/integration").mkdir() new File("result/smoke").mkdir() new File("result/sample").mkdir() new File("result/console").mkdir() } dependencies { compile(api) compile(group: 'commons-logging', name: 'commons-logging', version: '1.2') compile(group: 'org.apache.commons', name: 'commons-lang3', version: '3.9') compile(group: 'commons-io', name: 'commons-io', version: '2.6') compile(group: 'org.dom4j', name: 'dom4j', version: '2.1.3') { exclude (group: 'xpp3', module: 'xpp3') exclude (group: 'pull-parser', module: 'pull-parser') } compile(group: 'com.google.guava', name: 'guava', version: '28.0-jre') compile(group: 'org.slf4j', name: 'slf4j-api', version: '1.7.26') compile(group: 'org.codehaus.groovy', name: 'groovy-all', version: '2.4.12') compile(group: 'antlr', name: 'antlr', version: '2.7.7') compile(group: 'org.antlr', name: 'antlr-runtime', version: '3.2') compile(group: 'org.freemarker', name: 'freemarker', version: '2.3.16') compile(group: 'org.openoffice', name: 'juh', version: '3.0.0') compile(group: 'org.openoffice', name: 'ridl', version: '3.0.0') compile(group: 'org.openoffice', name: 'unoil', version: '3.0.0') compile(group: "org.apache.avalon.framework", name: "avalon-framework-api", version: '4.3.1') compile(group: "org.apache.avalon.framework", name: "avalon-framework-impl", version: '4.3.1') configurations { compile.exclude(group: 'javax.media', module: 'jai-core') compile.exclude(group: 'com.sun.media', module: 'jai-codec') } compile(group: 'javax.media.jai', name: 'com.springsource.javax.media.jai.core', version: '1.1.3') compile(group: "org.apache.xmlgraphics", name: "fop", version: "2.3") compile(group: "org.apache.xmlgraphics", name: "xmlgraphics-commons", version: "2.3") compile(group: "org.plutext", name: "jaxb-svg11", version: "1.0.2") compile(group: "org.plutext", name: "jaxb-xslfo", version: "1.0.1") compile(group: "org.plutext", name: "jaxb-xmldsig-core", version: "1.0.0") compile(group: "org.apache.xmlgraphics", name: "batik-bridge", version: "1.10") compile(group: "org.apache.xmlgraphics", name: "batik-svggen", version: "1.10") compile(group: "org.apache.xmlgraphics", name: "batik-awt-util", version: "1.10") compile(group: "org.apache.xmlgraphics", name: "batik-css", version: "1.10") compile(group: "xalan", name: "xalan", version: "2.7.2") compile(group: "xalan", name: "serializer", version: "2.7.2") compile(group: "com.lowagie", name: "itext", version: "2.1.7") { exclude(group: 'org.bouncycastle', module: 'bctsp-jdk14') exclude(group: 'org.bouncycastle', module: 'bcprov-jdk14') exclude(group: 'org.bouncycastle', module: 'bcmail-jdk14') exclude(group: 'bouncycastle', module: 'bcmail-jdk14') exclude(group: 'bouncycastle', module: 'bcprov-jdk14') exclude(group: 'bouncycastle', module: 'bctsp-jdk14') } compile(group: 'org.apache.poi', name: 'poi', version: '4.1.1') compile(group: 'org.apache.poi', name: 'poi-ooxml', version: '4.1.1') compile(group: 'org.apache.poi', name: 'poi-scratchpad', version: '4.1.1') { exclude(group: 'org.apache.poi', module: 'poi') } compile(group: 'org.xhtmlrenderer', name: 'flying-saucer-core', version: '9.1.18') compile(group: 'org.xhtmlrenderer', name: 'flying-saucer-pdf', version: '9.1.18') { exclude(group: 'org.bouncycastle', module: 'bctsp-jdk14') exclude(group: 'org.bouncycastle', module: 'bcprov-jdk14') exclude(group: 'org.bouncycastle', module: 'bcmail-jdk14') exclude(group: 'bouncycastle', module: 'bcmail-jdk14') exclude(group: 'bouncycastle', module: 'bcprov-jdk14') exclude(group: 'bouncycastle', module: 'bctsp-jdk14') } compile (group: 'com.openhtmltopdf', name: 'openhtmltopdf-core', version: '1.0.0') { exclude(group: 'junit', module: 'junit') } compile (group: 'com.openhtmltopdf', name: 'openhtmltopdf-rtl-support', version: '1.0.0') compile (group: 'com.openhtmltopdf', name: 'openhtmltopdf-pdfbox', version: '1.0.0') { exclude(group: 'junit', module: 'junit') } compile(group: "org.docx4j", name: "docx4j-JAXB-ReferenceImpl", version: "8.2.9") { exclude(group: 'junit', module: 'junit') exclude(group: 'log4j', module: 'log4j') exclude(group: 'org.slf4j', module: 'slf4j-log4j12') exclude(group: 'com.fasterxml.jackson.core') } compile(group: "org.docx4j", name: "docx4j-ImportXHTML", version: "8.0.0") { exclude(group: 'junit', module: 'junit') exclude(group: 'org.apache.poi', module: 'poi') exclude(group: 'log4j', module: 'log4j') exclude(group: 'org.slf4j', module: 'slf4j-log4j12') exclude(group: 'com.fasterxml.jackson.core') } compile(group: "org.docx4j", name: "docx4j-export-fo", version: "8.2.9") { exclude(group: 'junit', module: 'junit') exclude(group: 'log4j', module: 'log4j') exclude(group: 'org.slf4j', module: 'slf4j-log4j12') exclude(group: 'com.fasterxml.jackson.core') } compile(group: "org.jsoup", name: "jsoup", version: "1.12.1") compile(group: "com.jayway.jsonpath", name: "json-path", version: "2.4.0") compile(group: "com.opencsv", name: "opencsv", version: "5.5.2") compile group: 'org.olap4j', name: 'olap4j', version: '1.2.0' compile(group: "net.sf.jasperreports", name: "jasperreports", version: "6.9.0") { exclude(group: 'org.apache.lucene') exclude(group: 'commons-beanutils', module: 'commons-beanutils') exclude(group: 'com.google.zxing', module: 'core') exclude(group: 'com.ibm.icu', module: 'icu4j') exclude(group: 'com.fasterxml.jackson.core') exclude(group: 'org.jfree') exclude(group: 'org.eclipse.jdt.core.compiler', module: 'ecj') exclude(group: 'com.lowagie', module: 'itext') exclude(group: 'org.codehaus.castor', module: 'castor-xml') } compile(group: "net.sf.jasperreports", name: "jasperreports-fonts", version: "6.8.0") testCompile(group: 'org.jmockit', name: 'jmockit', version: '1.15') testCompile(group: 'junit', name: 'junit', version: '4.5') testCompile group: 'org.mockito', name: 'mockito-core', version: '3.2.4' testCompile(group: 'com.h2database', name: 'h2', version: '1.4.196') testCompile(group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3') testCompile(group: 'commons-dbcp', name: 'commons-dbcp', version: '1.4') testCompile(group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.9.2') testCompile(group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: '2.9.9') } test { maxHeapSize = "512m" jvmArgs '-XX:MaxPermSize=256m' workingDir = new File('../..') } } configure(server) { apply(plugin: 'application') dependencies { compile(api) compile(core) compile(console) compile(group: 'com.sparkjava', name: 'spark-core', version: '2.6.0') testCompile(group: 'junit', name: 'junit', version: '4.5') } mainClassName = "com.haulmont.yarg.server.ServerRunner" configurations.archives.artifacts.removeAll { it.file =~ 'tar' || it.file =~ 'zip' } installDist { doLast { def outputDir = destinationDir copy { from "./../../reporting.properties" into "$outputDir/bin" } } } test { maxHeapSize = "512m" jvmArgs '-XX:MaxPermSize=256m' workingDir = new File('../..') } } configure(console) { apply(plugin: 'application') dependencies { compile(api) compile(core) compile(group: 'commons-cli', name: 'commons-cli', version: '1.2') compile(group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3') compile(group: 'commons-dbcp', name: 'commons-dbcp', version: '1.4') testCompile(group: 'junit', name: 'junit', version: '4.5') } mainClassName = "com.haulmont.yarg.console.ConsoleRunner" configurations.archives.artifacts.removeAll { it.file =~ 'tar' || it.file =~ 'zip' } installDist { doLast { def outputDir = destinationDir copy { from "./../../reporting.properties" into "$outputDir/bin" } } } test { maxHeapSize = "512m" jvmArgs '-XX:MaxPermSize=256m' workingDir = new File('../..') } }