blob: 8ad3831b8d2b487565151dce81f882b64e8c077b [file] [log] [blame]
/*
* Copyright (c) 2016 Audi AG
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
plugins {
id "de.undercouch.download" version "3.2.0"
}
import de.undercouch.gradle.tasks.download.Download
description = 'OpenATFX MDF driver'
group = 'org.eclipse.mdm'
version = '1.1.3'
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'maven'
repositories {
mavenCentral()
}
dependencies {
// openATFX
compile fileTree(dir: 'build/openatfx-0.6.4/lib', include: '*.jar')
// testing
testCompile 'junit:junit:4.12'
}
test {
jvmArgs '-Dorg.slf4j.simpleLogger.defaultLogLevel=debug'
}
task downloadOpenATFX(type: Download) {
acceptAnyCertificate true
overwrite false
// use mirror subdomain of 'https://sourceforge.net/projects/openatfx/files/openatfx-0.6.4-jars.zip/download'
// because gradle has problems establishing a ssl connection with sourceforge directly
src 'https://10gbps-io.dl.sourceforge.net/project/openatfx/openatfx-0.6.4-jars.zip'
dest new File(buildDir, 'openatfx-0.6.4-jars.zip')
outputs.file dest
}
task unzipOpenATFX(dependsOn: downloadOpenATFX, type: Copy) {
from zipTree(downloadOpenATFX.dest)
into buildDir
outputs.dir new File(buildDir, 'openatfx-0.6.4')
}
compileJava.dependsOn unzipOpenATFX
tasks.withType(JavaCompile) {
sourceCompatibility = '1.7'
targetCompatibility = '1.7'
}