Permalink
Fetching contributors…
Cannot retrieve contributors at this time
110 lines (89 sloc) 3.41 KB
///////////////////////////////////////////////////////////////////////////////
//
// Build Script for building JavaPOS Contracts Library
//
// Author: denis.kuniss@wincor-nixdorf.com (2016)
//
///////////////////////////////////////////////////////////////////////////////
plugins {
id 'com.gradle.build-scan' version '1.9'
id 'java'
id 'eclipse'
// id 'maven' // comment this in and the next line out for populating to a local Maven repository for testing purposes
id 'com.github.oehme.sobula.bintray-release' version '0.6.7'
}
ext.githubProjectUrl = 'https://github.com/JavaPOSWorkingGroup/javapos-contracts'
ext.travisProjectUrl = 'https://travis-ci.org/JavaPOSWorkingGroup/javapos-contracts'
buildScan {
licenseAgreementUrl = 'https://gradle.com/terms-of-service'
licenseAgree = 'yes'
apply from: 'buildScan.gradle'
}
task wrapper(type: Wrapper) {
gradleVersion = '4.1'
}
///////////////////////////////////////////////////////////////////////////////
// Names and Versions
///////////////////////////////////////////////////////////////////////////////
def artifactName = 'javapos-contracts'
def groupId='org.javapos'
def uposVersion = '1.14'
version="${uposVersion}.3" // the last part after dot is the build/release version
///////////////////////////////////////////////////////////////////////////////
// Build Tasks
///////////////////////////////////////////////////////////////////////////////
sourceCompatibility = '1.5' // this defines the lowest JVM version this library may be used with
// this is to request the best matching JDK (currently 1.5) for compiling in Eclipse
// it is recommended to install a JDK which matches best to avoid applying APIs methods and types not available in specified JVM compatibility version
eclipse.classpath {
containers.clear()
containers "org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-$sourceCompatibility"
}
def javaposManifest = manifest {
attributes('Specification-Title': 'UnifiedPOS Standard',
'Specification-Vendor': 'UnifiedPOS Committee',
'Specification-Version': uposVersion,
'Implementation-Title': 'JavaPOS Contracts',
'Implementation-Vendor': 'github.com/JavaPOSWorkingGroup',
'Implementation-Version': version)
}
jar {
baseName = artifactName
manifest = javaposManifest
}
sourceJar {
manifest = javaposManifest
}
///////////////////////////////////////////////////////////////////////////////
// Artifact Upload
///////////////////////////////////////////////////////////////////////////////
if (project.plugins.hasPlugin('com.github.oehme.sobula.bintray-release'))
{ // evaluates only on travis-ci.org for releasing
group = "org.javapos"
description = "JavaPOS Contracts Library"
contacts {
"builder@javapos.org" {
moniker "JavaPOS Working Group"
roles "owner"
github "JavaPOSWorkingGroup"
}
}
bintray.user = "javaposworkinggroup"
bintray.pkg.version.mavenCentralSync.user = "kuniss"
}
if (project.plugins.hasPlugin('maven'))
{ // evaluates only at development environment, not at travis-ci.org
artifacts {
archives jar
}
uploadArchives {
repositories {
mavenDeployer {
repository(url: "file:$localTestFileRepositoryDir")
pom.artifactId = artifactName
pom.groupId = groupId
pom.version = version
}
}
}
}