@@ -32,6 +32,18 @@ tasks {
32
32
archiveFileName.set(" defaultplayer.jar" )
33
33
}
34
34
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
+
35
47
val prepareZip by creating(Copy ::class ) {
36
48
group = " distribution"
37
49
into(buildDir.resolve(" zip" ))
@@ -53,28 +65,20 @@ tasks {
53
65
from(configurations.default, arrayOf(" sdk" , " plugin" ).map { project(" :$it " ).getTasksByName(" sourcesJar" , false ).single().outputs.files })
54
66
into(" lib" )
55
67
})
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 }
66
74
}
67
75
68
76
val deploy by creating(Zip ::class ) {
69
77
group = " distribution"
70
- dependsOn(shadowJar, prepareZip)
78
+ dependsOn(deployJar)
79
+ from(prepareZip, copyDocs)
71
80
destinationDirectory.set(deployDir)
72
81
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
- }
78
82
}
79
83
80
84
run.configure {
0 commit comments