@@ -14,6 +14,7 @@ plugins { |
14 | 14 |
|
15 | 15 | // download the RR tools which have no Maven Repository |
16 | 16 | id "de.undercouch.download" version "latest.release" |
| 17 | + id 'org.hidetake.ssh' version "latest.release" |
17 | 18 |
|
18 | 19 | id "se.bjurr.gitchangelog.git-changelog-gradle-plugin" version "latest.release" |
19 | 20 | } |
@@ -85,8 +86,8 @@ dependencies { |
85 | 86 | testImplementation 'org.mockito:mockito-junit-jupiter:4.+' |
86 | 87 |
|
87 | 88 | // enforce latest version of JavaCC |
88 | | - testImplementation 'net.java.dev.javacc:javacc:7.0.12' |
89 | | - javacc 'net.java.dev.javacc:javacc:7.0.12' |
| 89 | + testImplementation 'net.java.dev.javacc:javacc:+' |
| 90 | + javacc 'net.java.dev.javacc:javacc:+' |
90 | 91 | } |
91 | 92 |
|
92 | 93 | compileJavacc { |
@@ -98,6 +99,11 @@ java { |
98 | 99 | withJavadocJar() |
99 | 100 | } |
100 | 101 |
|
| 102 | +javadoc { |
| 103 | + options.addBooleanOption('html5', true) |
| 104 | + options.addBooleanOption("Xdoclint:none", true) |
| 105 | +} |
| 106 | + |
101 | 107 | test { |
102 | 108 | environment = [ 'EXPORT_TEST_TO_FILE': 'True' ] |
103 | 109 | useJUnitPlatform() |
@@ -231,7 +237,7 @@ spotless { |
231 | 237 |
|
232 | 238 | format 'misc', { |
233 | 239 | // define the files to apply `misc` to |
234 | | - target '*.gradle', '*.md', '.gitignore' |
| 240 | + target '*.rst', '*.md', '.gitignore' |
235 | 241 |
|
236 | 242 | // define the steps to apply to those files |
237 | 243 | trimTrailingWhitespace() |
@@ -426,36 +432,33 @@ tasks.withType(JavaCompile) { |
426 | 432 | options.encoding = 'UTF-8' |
427 | 433 | } |
428 | 434 |
|
429 | | -task upload(type: Exec) { |
430 | | - dependsOn(build, gitChangelogTask) |
431 | | - |
432 | | - def versionStable = getVersion(false) |
433 | | - |
434 | | - if( findProperty("${project.name}.host")==null ) { |
435 | | - println( |
436 | | -""" |
437 | | -Property \"${project.name}.host\' not found. |
438 | | -Please define \"${project.name}.host\" in the Gradle configuration (e. g. \$HOME/.gradle/gradle.properties. |
439 | | -""" |
440 | | - ) |
441 | | - } else { |
442 | | - |
443 | | - // define the USERNAME and HOST properties in ~/.gradle/gradle.properties |
444 | | - args = ["sftp://${findProperty("${project.name}.username")}@${findProperty("${project.name}.host")}/download"] |
445 | | - |
446 | | - executable "sftp" |
447 | | - |
448 | | - standardInput = new ByteArrayInputStream("""<<EOF |
449 | | - mkdir ${project.name}-${versionStable} |
450 | | - cd ${project.name}-${versionStable} |
451 | | - put build/libs/* |
452 | | - quit |
453 | | - EOF""" |
454 | | - .getBytes(Charset.defaultCharset())) |
| 435 | +remotes { |
| 436 | + webServer { |
| 437 | + host = findProperty("${project.name}.host") |
| 438 | + user = findProperty("${project.name}.username") |
| 439 | + identity = new File("${System.properties['user.home']}/.ssh/id_rsa") |
| 440 | + } |
| 441 | +} |
455 | 442 |
|
456 | | - standardOutput = new ByteArrayOutputStream() |
457 | | - ext.output = { |
458 | | - return standardOutput.toString() |
| 443 | +task upload { |
| 444 | + doFirst { |
| 445 | + if( findProperty("${project.name}.host")==null ) { |
| 446 | + println( |
| 447 | + """ |
| 448 | + Property \"${project.name}.host\' not found. |
| 449 | + Please define \"${project.name}.host\" in the Gradle configuration (e. g. \$HOME/.gradle/gradle.properties. |
| 450 | + """ |
| 451 | + ) |
| 452 | + } |
| 453 | + } |
| 454 | + doLast { |
| 455 | + ssh.run { |
| 456 | + session(remotes.webServer) { |
| 457 | + def versionStable = getVersion(false) |
| 458 | + execute "mkdir -p download/${project.name}-${versionStable}" |
| 459 | + put from: "${project.buildDir}/libs", into: "download/${project.name}-${versionStable}" |
| 460 | + } |
459 | 461 | } |
460 | 462 | } |
461 | 463 | } |
| 464 | + |