diff options
author | Julien Gouesse <[email protected]> | 2023-04-15 18:51:11 +0200 |
---|---|---|
committer | Julien Gouesse <[email protected]> | 2023-04-15 18:51:11 +0200 |
commit | 3d12b05477d1ac532be2567bc00eb8ed035efecf (patch) | |
tree | 97bee650e760ff228ad01af3e24a71185943b242 | |
parent | 089ddb7d1cc078ba41e38d57e4209377a0424524 (diff) |
Moves the task to publish the Maven artifact into the subproject level
-rw-r--r-- | build.gradle | 61 |
1 files changed, 30 insertions, 31 deletions
diff --git a/build.gradle b/build.gradle index 39085a0..96ab6df 100644 --- a/build.gradle +++ b/build.gradle @@ -91,43 +91,42 @@ artifacts.archives packageSources testImplementation group: 'junit', name: 'junit', version:'4.13.2' testImplementation group: 'org.easymock', name: 'easymock', version:'5.1.0' } - -} -// SSH upload with Ant: https://blog.mrhaki.com/2009/12/gradle-goodness-using-optional-ant-task.html -configurations { - sshAntTask -} + // SSH upload with Ant: https://blog.mrhaki.com/2009/12/gradle-goodness-using-optional-ant-task.html + configurations { + sshAntTask + } -repositories { - mavenCentral() -} + repositories { + mavenCentral() + } -dependencies { - sshAntTask 'org.apache.ant:ant-jsch:1.10.13', 'com.jcraft:jsch:0.1.55' -} + dependencies { + sshAntTask 'org.apache.ant:ant-jsch:1.10.13', 'com.jcraft:jsch:0.1.55' + } -tasks.register('publishToJogAmpMavenArdor3d') { - description = 'Publishes all Maven publications produced by this project to the remote JogAmp Maven repository.' - group = "Publishing" + tasks.register('publishToJogAmpMavenArdor3d') { + description = 'Publishes all Maven publications produced by this project to the remote JogAmp Maven repository.' + group = "Publishing" - def passphrase = project.property('JogAmpScpPassword') + def passphrase = project.property('JogAmpScpPassword') - // Redefines scp Ant task, with the classpath property set to our newly defined sshAntTask configuration classpath. - ant.taskdef(name: 'scp', classname: 'org.apache.tools.ant.taskdefs.optional.ssh.Scp', + // Redefines scp Ant task, with the classpath property set to our newly defined sshAntTask configuration classpath. + ant.taskdef(name: 'scp', classname: 'org.apache.tools.ant.taskdefs.optional.ssh.Scp', classpath: configurations.sshAntTask.asPath) - doLast { - // Invokes the scp Ant task. (Use gradle -i to see the output of the Ant task.) - ant.scp(todir: '[email protected]:/srv/www/jogamp.org/deployment/maven-ardor3d/org/jogamp/ardor3d', - keyfile: '${user.home}/.ssh/id_rsa', - passphrase: passphrase as String, - sftp: 'false', - trust: 'true', - verbose: 'true') { - fileset(dir: '${user.home}/.m2/repository/org/jogamp/ardor3d') { - include(name: '**/**') - } - } - } + doLast { + // Invokes the scp Ant task. (Use gradle -i to see the output of the Ant task.) + ant.scp(todir: '[email protected]:/srv/www/jogamp.org/deployment/maven-ardor3d/org/jogamp/ardor3d/' + project.getName(), + keyfile: '${user.home}/.ssh/id_rsa', + passphrase: passphrase as String, + sftp: 'false', + trust: 'true', + verbose: 'true') { + fileset(dir: '${user.home}/.m2/repository/org/jogamp/ardor3d/' + project.getName()) { + include(name: '**/**') + } + } + } + } } |