blob: be1125fa5d846d8a2de5f6ae778b36eff7005957 [file] [log] [blame]
/********************************************************************************
* Copyright (c) 2015-2018 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*
********************************************************************************/
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.3.0'
def atfxVersion = '0.8.8'
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'maven'
repositories { mavenCentral() }
dependencies {
// openATFX
compile fileTree(dir: "${buildDir}/openatfx-${atfxVersion}/lib", include: '*.jar')
// testing
testCompile 'junit:junit:4.12'
}
test { jvmArgs '-Dorg.slf4j.simpleLogger.defaultLogLevel=debug' }
task downloadOpenATFX(type: Download) {
acceptAnyCertificate true
overwrite false
src "https://sourceforge.net/projects/openatfx/files/openatfx-${atfxVersion}-jars.zip/download"
dest file("${buildDir}/openatfx-${atfxVersion}-jars.zip")
outputs.file dest
}
task unzipOpenATFX(dependsOn: downloadOpenATFX, type: Copy) {
from zipTree(downloadOpenATFX.dest)
into buildDir
outputs.dir file("${buildDir}/openatfx-${atfxVersion}")
}
compileJava.dependsOn unzipOpenATFX
tasks.withType(JavaCompile) {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
jar {
metaInf { from 'NOTICE.txt' }
metaInf { from 'LICENSE.txt' }
}