Skip to content

Commit

Permalink
[GH-82] update gradle scripts for gradle 6.3 and general bundle clean…
Browse files Browse the repository at this point in the history
… up. (#83)

* GH-82 update gradle scripts for 6.3, mvn update for JDK 11 and general bundle clean up
  • Loading branch information
pcorless authored Apr 21, 2020
1 parent 1dce47b commit 5d175fc
Show file tree
Hide file tree
Showing 100 changed files with 10,825 additions and 11,240 deletions.
173 changes: 85 additions & 88 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,89 +1,86 @@
apply plugin: 'distribution'
apply plugin: 'project-report'

allprojects {
apply plugin: 'java'

sourceCompatibility = '1.8'
targetCompatibility = '1.8'

repositories {
mavenCentral()
maven {
url "http://anonsvn.icesoft.org/repo/maven2/snapshots/"
}
}

tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}

subprojects{
apply plugin: 'maven-publish'
}

evaluationDependsOn(':core:core-awt')

defaultTasks 'taskReport', 'dependencyReport', 'sourcesJar', 'genPomFileForCoreJarPub', 'genPomFileForViewerJarPub','osDistZip', 'osDistTar'

// Main distribution for os bundle
distributions {
os {
baseName = 'icepdf-os'
version "${VERSION + (RELEASE_TYPE?.trim()? '-' + RELEASE_TYPE:'')}"
contents {
duplicatesStrategy = 'exclude'
into('libs-source') {
from 'core/core-awt/build/libs/'
from 'viewer/viewer-awt/build/libs/'
include '*-sources.jar'
}
into('libs') {
// dependency jars
def libs = []
libs << project(':core:core-awt').configurations.compile
libs << project(':viewer:viewer-awt').configurations.compile
from libs
from project(':core:core-awt').jar
from project(':viewer:viewer-awt').jar
}
// dependencies information
into('dependencies') {
from 'build/reports/project'
}
// licenses copy
into('licenses') {
from 'licenses'
}
// maven auto generated pom files.
into ('maven2') {
from 'core/core-awt/build/publications/coreJar/pom-default.xml'
rename { String fileName ->
fileName.replace("pom-default.xml", "icepdf-core.xml")
}
}
into ('maven2') {
from 'viewer/viewer-awt/build/publications/viewerJar/pom-default.xml'
rename { String fileName ->
fileName.replace("pom-default.xml", "icepdf-viewer.xml")
}
}
// examples
// into ('examples') {
// from 'examples'
// }
// readme.
into (''){
from 'readme.html'
filter(org.apache.tools.ant.filters.ReplaceTokens,
tokens: [version: VERSION])
}
}
}
}

dependencies {
compile project(':core:core-awt')
compile project(':viewer:viewer-awt')
apply plugin: 'distribution'
apply plugin: 'project-report'

allprojects {
apply plugin: 'java'

tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}

// show api deprecation
// gradle.projectsEvaluated {
// tasks.withType(JavaCompile) {
// options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
// }
// }
}

subprojects{
apply plugin: 'maven-publish'
}

evaluationDependsOn(':core:core-awt')

defaultTasks 'taskReport', 'dependencyReport', 'sourcesJar', 'genPomFileForCoreJarPub', 'genPomFileForViewerJarPub','osDistZip', 'osDistTar'

// Main distribution for os bundle
distributions {
os {
distributionBaseName.set("icepdf-os")
version "${VERSION + (RELEASE_TYPE?.trim()? '-' + RELEASE_TYPE:'')}"
contents {
duplicatesStrategy = 'exclude'
into('libs-source') {
from 'core/core-awt/build/libs/'
from 'viewer/viewer-awt/build/libs/'
include '*-sources.jar'
}
into('libs') {
// dependency jars
def libs = []
libs << project(':core:core-awt').configurations.runtimeClasspath.files
// libs << project(':viewer:viewer-awt').configurations.runtimeClasspath.files
from libs
from project(':core:core-awt').jar
from project(':viewer:viewer-awt').jar
}
// dependencies information
into('dependencies') {
from 'build/reports/project'
}
// licenses copy
into('licenses') {
from 'licenses'
}
// maven auto generated pom files.
into ('maven2') {
from 'core/core-awt/build/publications/coreJar/pom-default.xml'
rename { String fileName ->
fileName.replace("pom-default.xml", "icepdf-core.xml")
}
}
into ('maven2') {
from 'viewer/viewer-awt/build/publications/viewerJar/pom-default.xml'
rename { String fileName ->
fileName.replace("pom-default.xml", "icepdf-viewer.xml")
}
}
// examples
// into ('examples') {
// from 'examples'
// }
// readme.
into (''){
from 'readme.html'
filter(org.apache.tools.ant.filters.ReplaceTokens,
tokens: [version: VERSION])
}
}
}
}

dependencies {
implementation project(':core:core-awt')
implementation project(':viewer:viewer-awt')
}
Loading

0 comments on commit 5d175fc

Please sign in to comment.