Automated build updates
This commit is contained in:
parent
6a8621a2cb
commit
bda00db16f
57
build.gradle
57
build.gradle
|
@ -15,36 +15,45 @@ archivesBaseName = 'jSerialComm'
|
||||||
version = '2.6.2'
|
version = '2.6.2'
|
||||||
ext.moduleName = 'com.fazecast.jSerialComm'
|
ext.moduleName = 'com.fazecast.jSerialComm'
|
||||||
|
|
||||||
|
if (hasProperty('manualBuild'))
|
||||||
|
{
|
||||||
|
assert hasProperty('java6Home'): "Set the property 'java6Home' in your gradle.properties file pointing to a Java 6 JDK installation"
|
||||||
|
assert hasProperty('java9Home'): "Set the property 'java9Home' in your gradle.properties file pointing to a Java 9 JDK installation"
|
||||||
|
}
|
||||||
|
|
||||||
sourceCompatibility = 1.6
|
sourceCompatibility = 1.6
|
||||||
targetCompatibility = 1.6
|
targetCompatibility = 1.6
|
||||||
javadoc.options.links("https://docs.oracle.com/javase/9/docs/api/")
|
javadoc.options.links("https://docs.oracle.com/javase/9/docs/api/")
|
||||||
javadoc.options.addBooleanOption('html4', true)
|
javadoc.options.addBooleanOption('html4', true)
|
||||||
|
|
||||||
def java6ExecutablesPath = new File(java6Home, 'bin')
|
if (hasProperty('manualBuild'))
|
||||||
def java9ExecutablesPath = new File(java9Home, 'bin')
|
{
|
||||||
def java6Executables = [:].withDefault { execName ->
|
def java6ExecutablesPath = new File(java6Home, 'bin')
|
||||||
def executable = new File(java6ExecutablesPath, execName)
|
def java9ExecutablesPath = new File(java9Home, 'bin')
|
||||||
executable
|
def java6Executables = [:].withDefault { execName ->
|
||||||
}
|
def executable = new File(java6ExecutablesPath, execName)
|
||||||
def java9Executables = [:].withDefault { execName ->
|
executable
|
||||||
def executable = new File(java9ExecutablesPath, execName)
|
}
|
||||||
executable
|
def java9Executables = [:].withDefault { execName ->
|
||||||
}
|
def executable = new File(java9ExecutablesPath, execName)
|
||||||
|
executable
|
||||||
tasks.withType(JavaCompile) {
|
}
|
||||||
options.with {
|
|
||||||
fork = true
|
tasks.withType(JavaCompile) {
|
||||||
forkOptions.javaHome = file(java6Home)
|
options.with {
|
||||||
|
fork = true
|
||||||
|
forkOptions.javaHome = file(java6Home)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tasks.withType(Javadoc) {
|
||||||
|
executable = java9Executables.javadoc
|
||||||
|
}
|
||||||
|
tasks.withType(Test) {
|
||||||
|
executable = java6Executables.java
|
||||||
|
}
|
||||||
|
tasks.withType(JavaExec) {
|
||||||
|
executable = java6Executables.java
|
||||||
}
|
}
|
||||||
}
|
|
||||||
tasks.withType(Javadoc) {
|
|
||||||
executable = java9Executables.javadoc
|
|
||||||
}
|
|
||||||
tasks.withType(Test) {
|
|
||||||
executable = java6Executables.java
|
|
||||||
}
|
|
||||||
tasks.withType(JavaExec) {
|
|
||||||
executable = java6Executables.java
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
|
|
Loading…
Reference in New Issue