Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for distribution packaging
- Loading branch information
1 parent
83573e3
commit a952b32
Showing
2 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
buildscript { | ||
repositories { | ||
mavenCentral() | ||
} | ||
dependencies { | ||
classpath 'org.hidetake:gradle-ssh-plugin:1.1.3' | ||
} | ||
} | ||
|
||
apply plugin: 'distribution' | ||
apply plugin: 'org.hidetake.ssh' | ||
|
||
distributions { | ||
main { | ||
contents { | ||
from { ['README.md', 'LICENSE', 'AUTHORS', 'CHANGELOG', 'build/docs', 'build/libs'] } | ||
} | ||
} | ||
} | ||
|
||
distTar { | ||
compression = Compression.GZIP | ||
} | ||
|
||
remotes { | ||
sourceforge { | ||
host = 'frs.sourceforge.net' | ||
user = 'fortuna' | ||
identity = file("${System.getProperty('user.home')}/.ssh/id_rsa") | ||
} | ||
sourceforge_shell { | ||
host = 'shell.sourceforge.net' | ||
user = 'fortuna' | ||
identity = file("${System.getProperty('user.home')}/.ssh/id_rsa") | ||
} | ||
sourceforge_shell_create { | ||
host = 'shell.sourceforge.net' | ||
user = 'fortuna,ical4j' | ||
identity = file("${System.getProperty('user.home')}/.ssh/id_rsa") | ||
} | ||
} | ||
|
||
task uploadDist(dependsOn: 'assembleDist') << { | ||
ssh.run { | ||
session(remotes.sourceforge_shell_create) { | ||
execute "create" | ||
} | ||
session(remotes.sourceforge_shell) { | ||
execute "mkdir -p /home/frs/project/ical4j/$project.name/$project.version" | ||
} | ||
session(remotes.sourceforge) { | ||
put "$buildDir/distributions/$project.name-${project.version}.zip", "/home/frs/project/ical4j/$project.name/$project.version" | ||
put "$buildDir/distributions/$project.name-${project.version}.tgz", "/home/frs/project/ical4j/$project.name/$project.version" | ||
} | ||
} | ||
} |