blob: 2ca712edfb153db061c1189e7a312ab9874177b3 [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.1.7'
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'
}
jar {
metaInf { from 'NOTICE.txt' }
metaInf { from 'LICENSE.txt' }
}