|
1 | | -apply plugin: 'application' |
2 | | - |
3 | | -project.version = '1.0' |
4 | | - |
5 | | -repositories { |
6 | | - mavenLocal() |
7 | | - jcenter() |
8 | | - mavenCentral() |
9 | | -} |
10 | | - |
11 | | -sourceSets { |
12 | | - main.resources.srcDirs = ['src'] |
13 | | -} |
14 | | - |
15 | | -mainClassName = 'php.runtime.launcher.Launcher' |
16 | | -jar.archiveName = 'DevelNext.jar' |
17 | | - |
18 | | -manifest { |
19 | | - attributes 'Main-Class': 'php.runtime.launcher.Launcher' |
20 | | -} |
21 | | - |
22 | | -task distPatchZip(type: Zip, dependsOn: ['clean', 'distPatch']) { |
23 | | - from "$project.buildDir/install/$project.name" |
24 | | - archiveName "DevelNext.Patch.zip" |
25 | | - |
26 | | - doLast { |
27 | | - def uploadPath = System.getProperty("uploadPath", "E:/Upload") |
28 | | - |
29 | | - if (new File(uploadPath).isDirectory()) { |
30 | | - copy { |
31 | | - from distPatchZip.archivePath |
32 | | - into "$uploadPath/YandexDisk" |
33 | | - } |
34 | | - } |
35 | | - } |
36 | | -} |
37 | | - |
38 | | - |
39 | | -task distPatch(dependsOn: ['clean', 'installDist']) { |
40 | | - doLast { |
41 | | - if (System.properties['os.name'].toLowerCase().contains('windows')) { |
42 | | - exec { |
43 | | - commandLine "$project.rootDir/develnext-tools/Launch4j/launch4jc.exe" |
44 | | - args "$project.rootDir/develnext/launcher/winLauncher.xml" |
45 | | - } |
46 | | - } |
47 | | - |
48 | | - copy { |
49 | | - from "$project.rootDir/develnext/launcher/DevelNext.exe" |
50 | | - into "$project.buildDir/install/$project.name" |
51 | | - } |
52 | | - |
53 | | - copy { |
54 | | - from "$project.rootDir/develnext/misc" |
55 | | - into "$project.buildDir/install/$project.name" |
56 | | - } |
57 | | - } |
58 | | -} |
59 | | - |
60 | | - |
61 | | -task distIdeWindows(dependsOn: ['distIde']) { |
62 | | - doLast { |
63 | | - delete "$project.buildDir/install/$project.name/tools/jreLinux" |
64 | | - } |
65 | | -} |
66 | | - |
67 | | -task distIdeLinux(dependsOn: ['distIde']) { |
68 | | - doLast { |
69 | | - delete "$project.buildDir/install/$project.name/tools/jre" |
70 | | - file("$project.buildDir/install/$project.name/tools/jreLinux").renameTo(file("$project.buildDir/install/$project.name/tools/jre")) |
71 | | - } |
72 | | -} |
73 | | - |
74 | | -task distIde(dependsOn: ['installDist']) { |
75 | | - doLast { |
76 | | - if (System.properties['os.name'].toLowerCase().contains('windows')) { |
77 | | - exec { |
78 | | - commandLine "$project.rootDir/develnext-tools/Launch4j/launch4jc.exe" |
79 | | - args "$project.rootDir/develnext/launcher/winLauncher.xml" |
80 | | - } |
81 | | - } |
82 | | - |
83 | | - copy { |
84 | | - from "$project.rootDir/develnext-tools" |
85 | | - into "$project.buildDir/install/$project.name/tools" |
86 | | - } |
87 | | - |
88 | | - copy { |
89 | | - from "$project.rootDir/develnext/launcher/DevelNext.exe" |
90 | | - into "$project.buildDir/install/$project.name" |
91 | | - } |
92 | | - |
93 | | - copy { |
94 | | - from "$project.rootDir/develnext/misc" |
95 | | - into "$project.buildDir/install/$project.name" |
96 | | - } |
97 | | - } |
98 | | -} |
99 | | - |
100 | | -task distIdeWindowsSetup(dependsOn: ['distIdeWindows']) { |
101 | | - doLast { |
102 | | - def issFile = "$project.rootDir/develnext/windowsSetup/innosetup.iss".replace("\\", "/") |
103 | | - def innoSetupBin = "$project.rootDir/develnext-tools/innoSetup/ISCC.exe".replace("\\", "/") |
104 | | - |
105 | | - exec { |
106 | | - commandLine innoSetupBin, '/Qp', issFile |
107 | | - } |
108 | | - |
109 | | - def uploadPath = System.getProperty("uploadPath", "E:/Upload") |
110 | | - |
111 | | - if (new File(uploadPath).isDirectory()) { |
112 | | - copy { |
113 | | - from "$project.buildDir/distributions/DevelNextSetup.exe" |
114 | | - into "$uploadPath/YandexDisk" |
115 | | - } |
116 | | - } |
117 | | - } |
118 | | -} |
119 | | - |
120 | | -task distIdeLinuxSetup(type: Tar, dependsOn: ['distIdeLinux']) { |
121 | | - def installDir = "$project.buildDir/install/$project.name" |
122 | | - |
123 | | - compression = Compression.GZIP |
124 | | - archiveName "DevelNextLinux.tar.gz" |
125 | | - |
126 | | - from(installDir) { |
127 | | - exclude('*.sh') |
128 | | - exclude('bin/develnext') |
129 | | - exclude('tools/gradle/bin/gradle') |
130 | | - exclude('tools/jre/bin/java') |
131 | | - } |
132 | | - |
133 | | - from(installDir) { |
134 | | - include('*.sh') |
135 | | - include('bin/develnext') |
136 | | - include('tools/gradle/bin/gradle') |
137 | | - include('tools/jre/bin/java') |
138 | | - |
139 | | - fileMode = 0755 |
140 | | - } |
141 | | - |
142 | | - doLast { |
143 | | - def uploadPath = System.getProperty("uploadPath", "E:/Upload") |
144 | | - |
145 | | - if (new File(uploadPath).isDirectory()) { |
146 | | - copy { |
147 | | - from distIdeLinuxSetup.archivePath |
148 | | - into "$uploadPath/YandexDisk" |
149 | | - } |
150 | | - } |
151 | | - } |
152 | | -} |
| 1 | +apply plugin: 'application' |
| 2 | + |
| 3 | +project.version = '1.0' |
| 4 | + |
| 5 | +repositories { |
| 6 | + mavenLocal() |
| 7 | + jcenter() |
| 8 | + mavenCentral() |
| 9 | +} |
| 10 | + |
| 11 | +sourceSets { |
| 12 | + main.resources.srcDirs = ['src'] |
| 13 | +} |
| 14 | + |
| 15 | +run { |
| 16 | + mainClassName = 'php.runtime.launcher.Launcher' |
| 17 | + jvmArgs += ["-Dfile.encoding=UTF-8", "-Xms256m", "-Xms1280m"] |
| 18 | +} |
| 19 | + |
| 20 | +jar.archiveName = 'DevelNext.jar' |
| 21 | + |
| 22 | +manifest { |
| 23 | + attributes 'Main-Class': 'php.runtime.launcher.Launcher' |
| 24 | +} |
| 25 | + |
| 26 | +task distWindowsPatch(type: Zip, dependsOn: ['clean', 'distPatch']) { |
| 27 | + from "$project.buildDir/install/$project.name" |
| 28 | + archiveName "DevelNext.WindowsPatch.zip" |
| 29 | + |
| 30 | + doLast { |
| 31 | + def issFile = "$project.rootDir/develnext/windowsSetup/innopatchsetup.iss".replace("\\", "/") |
| 32 | + def innoSetupBin = "$project.rootDir/develnext-tools/innoSetup/ISCC.exe".replace("\\", "/") |
| 33 | + |
| 34 | + exec { |
| 35 | + commandLine innoSetupBin, '/Qp', issFile |
| 36 | + } |
| 37 | + |
| 38 | + def uploadPath = System.getProperty("uploadPath", "E:/Upload") |
| 39 | + |
| 40 | + if (new File(uploadPath).isDirectory()) { |
| 41 | + copy { |
| 42 | + from "$project.buildDir/distributions/DevelNext.WindowsPatch.exe" |
| 43 | + into "$uploadPath/YandexDisk" |
| 44 | + } |
| 45 | + |
| 46 | + copy { |
| 47 | + from distWindowsPatch.archivePath |
| 48 | + into "$uploadPath/YandexDisk" |
| 49 | + } |
| 50 | + } |
| 51 | + } |
| 52 | +} |
| 53 | + |
| 54 | +task distLinuxPatch(type: Tar, dependsOn: ['clean', 'distPatch']) { |
| 55 | + def installDir = "$project.buildDir/install/$project.name" |
| 56 | + |
| 57 | + compression = Compression.GZIP |
| 58 | + archiveName "DevelNext.LinuxPatch.tar.gz" |
| 59 | + |
| 60 | + from(installDir) { |
| 61 | + exclude('*.sh') |
| 62 | + exclude('bin/develnext') |
| 63 | + exclude('tools/gradle/bin/gradle') |
| 64 | + exclude('tools/jre/bin/java') |
| 65 | + } |
| 66 | + |
| 67 | + from(installDir) { |
| 68 | + include('*.sh') |
| 69 | + include('bin/develnext') |
| 70 | + include('tools/gradle/bin/gradle') |
| 71 | + include('tools/jre/bin/java') |
| 72 | + |
| 73 | + fileMode = 0755 |
| 74 | + } |
| 75 | + |
| 76 | + doLast { |
| 77 | + def uploadPath = System.getProperty("uploadPath", "E:/Upload") |
| 78 | + |
| 79 | + if (new File(uploadPath).isDirectory()) { |
| 80 | + copy { |
| 81 | + from distLinuxPatch.archivePath |
| 82 | + into "$uploadPath/YandexDisk" |
| 83 | + } |
| 84 | + } |
| 85 | + } |
| 86 | +} |
| 87 | + |
| 88 | + |
| 89 | +task distPatch(dependsOn: ['clean', 'installDist']) { |
| 90 | + doLast { |
| 91 | + if (System.properties['os.name'].toLowerCase().contains('windows')) { |
| 92 | + exec { |
| 93 | + commandLine "$project.rootDir/develnext-tools/Launch4j/launch4jc.exe" |
| 94 | + args "$project.rootDir/develnext/launcher/winLauncher.xml" |
| 95 | + } |
| 96 | + } |
| 97 | + |
| 98 | + copy { |
| 99 | + from "$project.rootDir/develnext/launcher/DevelNext.exe" |
| 100 | + into "$project.buildDir/install/$project.name" |
| 101 | + } |
| 102 | + |
| 103 | + copy { |
| 104 | + from "$project.rootDir/develnext/misc" |
| 105 | + into "$project.buildDir/install/$project.name" |
| 106 | + } |
| 107 | + } |
| 108 | +} |
| 109 | + |
| 110 | + |
| 111 | +task distIdeWindows(dependsOn: ['distIde']) { |
| 112 | + doLast { |
| 113 | + delete "$project.buildDir/install/$project.name/tools/jreLinux" |
| 114 | + } |
| 115 | +} |
| 116 | + |
| 117 | +task distIdeLinux(dependsOn: ['distIde']) { |
| 118 | + doLast { |
| 119 | + delete "$project.buildDir/install/$project.name/tools/jre" |
| 120 | + file("$project.buildDir/install/$project.name/tools/jreLinux").renameTo(file("$project.buildDir/install/$project.name/tools/jre")) |
| 121 | + } |
| 122 | +} |
| 123 | + |
| 124 | +task distIde(dependsOn: ['installDist']) { |
| 125 | + doLast { |
| 126 | + if (System.properties['os.name'].toLowerCase().contains('windows')) { |
| 127 | + exec { |
| 128 | + commandLine "$project.rootDir/develnext-tools/Launch4j/launch4jc.exe" |
| 129 | + args "$project.rootDir/develnext/launcher/winLauncher.xml" |
| 130 | + } |
| 131 | + } |
| 132 | + |
| 133 | + copy { |
| 134 | + from "$project.rootDir/develnext-tools" |
| 135 | + into "$project.buildDir/install/$project.name/tools" |
| 136 | + } |
| 137 | + |
| 138 | + copy { |
| 139 | + from "$project.rootDir/develnext/launcher/DevelNext.exe" |
| 140 | + into "$project.buildDir/install/$project.name" |
| 141 | + } |
| 142 | + |
| 143 | + copy { |
| 144 | + from "$project.rootDir/develnext/misc" |
| 145 | + into "$project.buildDir/install/$project.name" |
| 146 | + } |
| 147 | + } |
| 148 | +} |
| 149 | + |
| 150 | +task distIdeWindowsSetup(dependsOn: ['distIdeWindows']) { |
| 151 | + doLast { |
| 152 | + def issFile = "$project.rootDir/develnext/windowsSetup/innosetup.iss".replace("\\", "/") |
| 153 | + def innoSetupBin = "$project.rootDir/develnext-tools/innoSetup/ISCC.exe".replace("\\", "/") |
| 154 | + |
| 155 | + exec { |
| 156 | + commandLine innoSetupBin, '/Qp', issFile |
| 157 | + } |
| 158 | + |
| 159 | + def uploadPath = System.getProperty("uploadPath", "E:/Upload") |
| 160 | + |
| 161 | + if (new File(uploadPath).isDirectory()) { |
| 162 | + copy { |
| 163 | + from "$project.buildDir/distributions/DevelNextSetup.exe" |
| 164 | + into "$uploadPath/YandexDisk" |
| 165 | + } |
| 166 | + } |
| 167 | + } |
| 168 | +} |
| 169 | + |
| 170 | +task distIdeLinuxSetup(type: Tar, dependsOn: ['distIdeLinux']) { |
| 171 | + def installDir = "$project.buildDir/install/$project.name" |
| 172 | + |
| 173 | + compression = Compression.GZIP |
| 174 | + archiveName "DevelNextLinux.tar.gz" |
| 175 | + |
| 176 | + from(installDir) { |
| 177 | + exclude('*.sh') |
| 178 | + exclude('bin/develnext') |
| 179 | + exclude('tools/gradle/bin/gradle') |
| 180 | + exclude('tools/jre/bin/java') |
| 181 | + } |
| 182 | + |
| 183 | + from(installDir) { |
| 184 | + include('*.sh') |
| 185 | + include('bin/develnext') |
| 186 | + include('tools/gradle/bin/gradle') |
| 187 | + include('tools/jre/bin/java') |
| 188 | + |
| 189 | + fileMode = 0755 |
| 190 | + } |
| 191 | + |
| 192 | + doLast { |
| 193 | + def uploadPath = System.getProperty("uploadPath", "E:/Upload") |
| 194 | + |
| 195 | + if (new File(uploadPath).isDirectory()) { |
| 196 | + copy { |
| 197 | + from distIdeLinuxSetup.archivePath |
| 198 | + into "$uploadPath/YandexDisk" |
| 199 | + } |
| 200 | + } |
| 201 | + } |
| 202 | +} |
0 commit comments