@@ -32,6 +32,18 @@ tasks {
3232 archiveFileName.set(" defaultplayer.jar" )
3333 }
3434
35+ val copyDocs by creating(Copy ::class ) {
36+ dependsOn(" :sdk:doc" , " :plugin:doc" )
37+ into(buildDir.resolve(" zip" ))
38+ with (copySpec {
39+ from(project(" :plugin" ).buildDir.resolve(" doc" ))
40+ into(" doc/plugin-$gameName " )
41+ }, copySpec {
42+ from(project(" :sdk" ).buildDir.resolve(" doc" ))
43+ into(" doc/sdk" )
44+ })
45+ }
46+
3547 val prepareZip by creating(Copy ::class ) {
3648 group = " distribution"
3749 into(buildDir.resolve(" zip" ))
@@ -53,28 +65,20 @@ tasks {
5365 from(configurations.default, arrayOf(" sdk" , " plugin" ).map { project(" :$it " ).getTasksByName(" sourcesJar" , false ).single().outputs.files })
5466 into(" lib" )
5567 })
56- if (! project.hasProperty(" nodoc" )) {
57- dependsOn(" :sdk:doc" , " :plugin:doc" )
58- with (copySpec {
59- from(project(" :plugin" ).buildDir.resolve(" doc" ))
60- into(" doc/plugin-$gameName " )
61- }, copySpec {
62- from(project(" :sdk" ).buildDir.resolve(" doc" ))
63- into(" doc/sdk" )
64- })
65- }
68+ }
69+
70+ val deployJar by creating(Copy ::class ) {
71+ from(shadowJar)
72+ into(deployDir)
73+ rename { project.property(" deployedPlayer" ) as String }
6674 }
6775
6876 val deploy by creating(Zip ::class ) {
6977 group = " distribution"
70- dependsOn(shadowJar, prepareZip)
78+ dependsOn(deployJar)
79+ from(prepareZip, copyDocs)
7180 destinationDirectory.set(deployDir)
7281 archiveFileName.set(" simpleclient-$gameName -src.zip" )
73- from(prepareZip.destinationDir)
74- doFirst {
75- shadowJar.get().outputs.files.singleFile.copyTo(
76- deployDir.resolve(project.property(" deployedPlayer" ) as String ), true )
77- }
7882 }
7983
8084 run.configure {
0 commit comments