mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 08:37:25 -05:00
radio reference client library and adds support for storing user credentials in user preferences. Removes legacy apache axis SOAP and WSDL libraries calls to radio reference web services -- not required by the new library.
183 lines
6.8 KiB
Groovy
183 lines
6.8 KiB
Groovy
/*
|
|
*
|
|
* * ******************************************************************************
|
|
* * Copyright (C) 2014-2019 Dennis Sheirer
|
|
* *
|
|
* * This program is free software: you can redistribute it and/or modify
|
|
* * it under the terms of the GNU General Public License as published by
|
|
* * the Free Software Foundation, either version 3 of the License, or
|
|
* * (at your option) any later version.
|
|
* *
|
|
* * This program is distributed in the hope that it will be useful,
|
|
* * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* * GNU General Public License for more details.
|
|
* *
|
|
* * You should have received a copy of the GNU General Public License
|
|
* * along with this program. If not, see <http://www.gnu.org/licenses/>
|
|
* * *****************************************************************************
|
|
*
|
|
*
|
|
*/
|
|
plugins {
|
|
id 'application'
|
|
id 'java'
|
|
id 'idea'
|
|
id 'org.openjfx.javafxplugin' version '0.0.6'
|
|
id 'org.beryx.runtime' version '1.1.5'
|
|
}
|
|
|
|
repositories {
|
|
jcenter()
|
|
mavenCentral()
|
|
}
|
|
|
|
version = '0.4.0-alpha.9'
|
|
sourceCompatibility = '11'
|
|
|
|
sourceSets {
|
|
main.java.srcDirs 'src/main'
|
|
test.java.srcDirs 'src/test'
|
|
}
|
|
|
|
dependencies {
|
|
testCompile 'junit:junit:4.12'
|
|
testCompile 'org.assertj:assertj-core:3.8.0'
|
|
compile fileTree(dir: 'imports', include: '*.jar')
|
|
compile 'ch.qos.logback:logback-core:1.2.3'
|
|
compile 'ch.qos.logback:logback-classic:1.2.3'
|
|
compile 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.9.8'
|
|
compile 'com.github.jiconfont:jiconfont-font_awesome:4.7.0.1'
|
|
compile 'com.github.jiconfont:jiconfont-javafx:1.0.0'
|
|
compile 'com.github.jiconfont:jiconfont-swing:1.0.1'
|
|
compile 'com.github.wendykierp:JTransforms:3.1'
|
|
compile 'com.google.guava:guava:27.0.1-jre'
|
|
compile 'com.jidesoft:jide-oss:3.6.18'
|
|
compile 'com.miglayout:miglayout-swing:5.2'
|
|
compile 'io.github.dsheirer:radio-reference-api:15.0.1'
|
|
compile 'javax.usb:usb-api:1.0.2'
|
|
compile 'net.coderazzi:tablefilter-swing:5.4.0'
|
|
compile 'org.apache.commons:commons-lang3:3.8.1'
|
|
compile 'org.apache.commons:commons-io:1.3.2'
|
|
compile 'org.apache.mina:mina-core:2.0.19'
|
|
compile 'org.apache.mina:mina-http:2.0.19'
|
|
compile "org.openjfx:javafx-base:11:win"
|
|
compile "org.openjfx:javafx-base:11:linux"
|
|
compile "org.openjfx:javafx-base:11:mac"
|
|
compile "org.openjfx:javafx-controls:11:win"
|
|
compile "org.openjfx:javafx-controls:11:linux"
|
|
compile "org.openjfx:javafx-controls:11:mac"
|
|
compile "org.openjfx:javafx-graphics:11:win"
|
|
compile "org.openjfx:javafx-graphics:11:linux"
|
|
compile "org.openjfx:javafx-graphics:11:mac"
|
|
compile "org.openjfx:javafx-swing:11:win"
|
|
compile "org.openjfx:javafx-swing:11:linux"
|
|
compile "org.openjfx:javafx-swing:11:mac"
|
|
compile 'org.slf4j:slf4j-api:1.7.25'
|
|
compile 'org.usb4java:libusb4java:1.3.0'
|
|
compile 'org.usb4java:usb4java:1.3.0'
|
|
compile 'org.usb4java:usb4java-javax:1.3.0'
|
|
compile 'pl.edu.icm:JLargeArrays:1.6'
|
|
}
|
|
|
|
application {
|
|
mainClassName = "io.github.dsheirer.gui.SDRTrunk"
|
|
}
|
|
|
|
idea {
|
|
module {
|
|
downloadJavadoc = true
|
|
downloadSources = true
|
|
}
|
|
}
|
|
|
|
javafx {
|
|
modules = ['javafx.base', 'javafx.controls', 'javafx.graphics', 'javafx.swing']
|
|
}
|
|
|
|
task buildSdr(type: Jar) {
|
|
manifest {
|
|
attributes 'Implementation-Title': 'SdrTrunk project',
|
|
'Implementation-Version': version,
|
|
'Main-Class': 'io.github.dsheirer.gui.SDRTrunk',
|
|
'Class-Path': 'jmbe-0.3.2.jar jmbe-0.3.3.jar'
|
|
}
|
|
baseName = project.name + '-all'
|
|
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
|
|
with jar
|
|
}
|
|
|
|
/**
|
|
* Java Development Kit (JDK) locations. These paths must point to the 'bin' directory
|
|
* within a JDK for each of the specified architectures. These JDKs are used by the
|
|
* runtime and runtimeZip tasks to produce platform-specific builds
|
|
*/
|
|
def jdkLinux_aarch64 = '/media/denny/WD250GB/java/bellsoft/linux-aarch64/jdk-11.0.2'
|
|
def jdkLinux_x64 = '/media/denny/WD250GB/java/bellsoft/linux-x64/jdk-11.0.2'
|
|
def jdkOsx_x64 = '/media/denny/WD250GB/java/bellsoft/osx-x64/jdk-11.0.2.jdk'
|
|
def jdkWindows_x64 = '/media/denny/WD250GB/java/bellsoft/windows-x64/jdk-11.0.2'
|
|
|
|
runtime {
|
|
targetPlatform('linux-aarch64', jdkLinux_aarch64)
|
|
targetPlatform('linux-x64', jdkLinux_x64)
|
|
targetPlatform('osx-x64', jdkOsx_x64)
|
|
targetPlatform('windows-x64', jdkWindows_x64)
|
|
|
|
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
|
|
modules = ['java.desktop', 'java.naming', 'jdk.unsupported', 'jdk.unsupported.desktop']
|
|
imageZip = file("$buildDir/image/sdr-trunk-" + version + ".zip")
|
|
}
|
|
|
|
/**
|
|
* Check for existence of JDK folders for each supported platform before creating runtime images
|
|
*/
|
|
tasks.runtime.doFirst {
|
|
def linux_aarch64 = new File(jdkLinux_aarch64)
|
|
|
|
if(!linux_aarch64.exists())
|
|
{
|
|
println("Linux aarch64 JDK was not found at " + jdkLinux_aarch64)
|
|
throw new GradleException("Cannot find Java Development Kit (JDK) for linux-aarch64 architecture. " +
|
|
"Please update the build.gradle script to provide the correct path")
|
|
}
|
|
|
|
def linux_x64 = new File(jdkLinux_x64)
|
|
|
|
if(!linux_x64.exists())
|
|
{
|
|
println("Linux x64 JDK was not found at " + jdkLinux_x64)
|
|
throw new GradleException("Cannot find Java Development Kit (JDK) for linux-x64 architecture. " +
|
|
"Please update the build.gradle script to provide the correct path")
|
|
}
|
|
|
|
def osx_x64 = new File(jdkOsx_x64)
|
|
|
|
if(!osx_x64.exists())
|
|
{
|
|
println("OSX x64 JDK was not found at " + jdkOsx_x64);
|
|
throw new GradleException("Cannot find Java Development Kit (JDK) for osx-x64 architecture. " +
|
|
"Please update the build.gradle script to provide the correct path")
|
|
}
|
|
|
|
def windows_x64 = new File(jdkWindows_x64)
|
|
|
|
if(!windows_x64.exists())
|
|
{
|
|
println("Windows x64 JDK was not found at " + jdkWindows_x64)
|
|
throw new GradleException("Cannot find Java Development Kit (JDK) for windows-x64 architecture. " +
|
|
"Please update the build.gradle script to provide the correct path")
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Since we have to list each of the platform-specific JavaFX libraries as dependencies,
|
|
* remove them from each build image
|
|
*/
|
|
tasks.runtime.doLast {
|
|
delete(fileTree('build/image/sdr-trunk-linux-aarch64/lib').include { it.name ==~ /javafx.*-(win|mac)\.jar/ })
|
|
delete(fileTree('build/image/sdr-trunk-linux-x64/lib').include { it.name ==~ /javafx.*-(win|mac)\.jar/ })
|
|
delete(fileTree('build/image/sdr-trunk-osx-x64/lib').include { it.name ==~ /javafx.*-(win|linux)\.jar/ })
|
|
delete(fileTree('build/image/sdr-trunk-windows-x64/lib').include { it.name ==~ /javafx.*-(linux|mac)\.jar/ })
|
|
}
|
|
|