Files
opencv-gpu/build.gradle
2020-02-18 12:53:48 +01:00

95 lines
2.0 KiB
Groovy

buildscript {
dependencies {
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:4.8.1'
}
repositories {
maven {
url = 'https://project.nes.uni-due.de/artifactory/releases';
credentials { username = 'public'; password = 'public' }
authentication { basic(BasicAuthentication) }
}
}
}
allprojects {
// set version for our project
group = 'de.unidue.nes'
version = '1.0.0-SNAPSHOT'
// set versions for our libraries
ext {
// program dependencies
versionJdt = '2.2.300'
versionJackson = '2.10.0'
versionJaxb = '2.1'
// testing dependencies
versionJunit = '4.12'
}
}
subprojects {
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.artifactory'
apply plugin: 'java'
sourceCompatibility = '1.8'
task sourcesJar(type: Jar) {
classifier = 'sources'
from(sourceSets.main.allJava)
}
publishing {
publications {
maven(MavenPublication) {
from(components.java)
artifact(sourcesJar)
}
}
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
repositories {
maven {
url = 'https://project.nes.uni-due.de/artifactory/releases';
credentials { username = 'public'; password = 'public' }
authentication { basic(BasicAuthentication) }
}
}
def isLinux = System.getProperties()['os.name'].contains('inux');
def libraryPath = rootProject.file('gpu-opencvcore/' + (isLinux?'jenkins':'win64'));
test {
testLogging.showStandardStreams = true
def envVariable = isLinux?'LD_LIBRARY_PATH':'PATH'
def envSeparator = isLinux?':':';'
environment envVariable, (environment.get(envVariable) + envSeparator + libraryPath.getAbsolutePath())
}
tasks.withType(Test) {
systemProperty "java.library.path", libraryPath.getAbsolutePath()
}
artifactoryPublish.dependsOn('build')
artifactoryPublish {
publications(publishing.publications.maven);
}
}