Mercurial > hg > Applications > TreeVNC
annotate build.gradle @ 198:f5abf6ba9957
update Todo.
author | oc |
---|---|
date | Fri, 27 Jun 2014 17:10:33 +0900 |
parents | c1c009a06c2e |
children | 2b3eb4a9492f |
rev | line source |
---|---|
0
4689cc86d6cb
create TreeViewer2 Repository
Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1 apply plugin:'java' |
4689cc86d6cb
create TreeViewer2 Repository
Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
2 apply plugin: 'eclipse' |
4689cc86d6cb
create TreeViewer2 Repository
Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
3 |
90 | 4 sourceCompatibility = 1.8 |
5 targetCompatibility = 1.8 | |
57
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
6 version = '2.7.2' |
0
4689cc86d6cb
create TreeViewer2 Repository
Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
7 |
57
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
8 project.ext.baseName = 'tightvnc-jviewer' |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
9 def buildNo = processBuildNo(version) |
0
4689cc86d6cb
create TreeViewer2 Repository
Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
10 |
4689cc86d6cb
create TreeViewer2 Repository
Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
11 defaultTasks 'clean', 'dist' |
4689cc86d6cb
create TreeViewer2 Repository
Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
12 |
4689cc86d6cb
create TreeViewer2 Repository
Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
13 configurations { |
57
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
14 viewerSwingCompile { extendsFrom compile } |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
15 viewerSwingRuntime { extendsFrom viewerSwingCompile, runtime } |
0
4689cc86d6cb
create TreeViewer2 Repository
Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
16 } |
4689cc86d6cb
create TreeViewer2 Repository
Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
17 |
4689cc86d6cb
create TreeViewer2 Repository
Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
18 sourceSets { |
4689cc86d6cb
create TreeViewer2 Repository
Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
19 viewerSwing { |
4689cc86d6cb
create TreeViewer2 Repository
Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
20 java { |
4689cc86d6cb
create TreeViewer2 Repository
Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
21 srcDir 'src/viewer_swing/java' |
4689cc86d6cb
create TreeViewer2 Repository
Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
22 } |
4689cc86d6cb
create TreeViewer2 Repository
Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
23 resources { |
4689cc86d6cb
create TreeViewer2 Repository
Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
24 srcDir 'src/viewer_swing/resources' |
4689cc86d6cb
create TreeViewer2 Repository
Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
25 } |
4689cc86d6cb
create TreeViewer2 Repository
Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
26 } |
4689cc86d6cb
create TreeViewer2 Repository
Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
27 main { |
4689cc86d6cb
create TreeViewer2 Repository
Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
28 java.srcDirs += viewerSwing.java.srcDirs |
4689cc86d6cb
create TreeViewer2 Repository
Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
29 resources.srcDirs += viewerSwing.resources.srcDirs |
4689cc86d6cb
create TreeViewer2 Repository
Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
30 } |
4689cc86d6cb
create TreeViewer2 Repository
Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
31 } |
4689cc86d6cb
create TreeViewer2 Repository
Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
32 |
57
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
33 repositories { |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
34 flatDir { |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
35 dirs 'src/libs/' |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
36 } |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
37 } |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
38 |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
39 dependencies { |
95 | 40 viewerSwingCompile group: 'com.jcraft', name: 'jsch', version: '0.1.+', ext: 'jar' |
61
d9cf08c6415c
During implementation change screen.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
59
diff
changeset
|
41 compile group: 'com.jcraft', name: 'jsch', version: '0.1.+', ext: 'jar' |
57
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
42 viewerSwingRuntime configurations.viewerSwingCompile |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
43 } |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
44 |
61
d9cf08c6415c
During implementation change screen.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
59
diff
changeset
|
45 def manifestAttributes = ['Main-Class': 'com.glavsoft.viewer.TreeViewer', |
57
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
46 'Implementation-Version': "${project.version} (${buildNo})", |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
47 'Implementation-Title': 'TightVNC Viewer', |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
48 'Implementation-Vendor': 'GlavSoft LLC.'] |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
49 |
0
4689cc86d6cb
create TreeViewer2 Repository
Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
50 jar { |
57
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
51 baseName = project.baseName |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
52 version = null |
0
4689cc86d6cb
create TreeViewer2 Repository
Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
53 manifest { |
57
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
54 attributes manifestAttributes |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
55 } |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
56 def runtimeDeps = configurations.viewerSwingRuntime.collect { |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
57 it.isDirectory() ? it : zipTree(it) |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
58 } |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
59 from(runtimeDeps) { |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
60 exclude 'META-INF/**' |
0
4689cc86d6cb
create TreeViewer2 Repository
Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
61 } |
4689cc86d6cb
create TreeViewer2 Repository
Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
62 } |
4689cc86d6cb
create TreeViewer2 Repository
Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
63 |
57
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
64 task noSshJar (type: Jar, dependsOn: classes) { |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
65 baseName = 'nossh/' + project.baseName |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
66 version = null |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
67 manifest { |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
68 attributes manifestAttributes |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
69 } |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
70 from sourceSets.main.output |
0
4689cc86d6cb
create TreeViewer2 Repository
Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
71 } |
4689cc86d6cb
create TreeViewer2 Repository
Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
72 |
57
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
73 artifacts { |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
74 archives file('src/web/viewer-applet-example.html') |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
75 archives noSshJar |
0
4689cc86d6cb
create TreeViewer2 Repository
Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
76 } |
4689cc86d6cb
create TreeViewer2 Repository
Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
77 |
74 | 78 uploadArchives { |
79 repositories { | |
95 | 80 |
74 | 81 } |
82 uploadDescriptor = false | |
83 } | |
0
4689cc86d6cb
create TreeViewer2 Repository
Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
84 |
57
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
85 task dist(dependsOn: uploadArchives) |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
86 |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
87 def processBuildNo(currentVersion) { |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
88 final String VERSION = 'version' |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
89 final String BUILD = 'build' |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
90 |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
91 def lastVersion = currentVersion |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
92 def lastBuild = 0 |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
93 def buildNoFile = new File('.build_no') |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
94 if ( ! buildNoFile.exists()) { |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
95 buildNoFile.createNewFile() |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
96 buildNoFile << "${VERSION}=${lastVersion}\n${BUILD}=${lastBuild}" |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
97 } |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
98 def versions = [:] |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
99 buildNoFile.eachLine { |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
100 def splitted = it.split('=') |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
101 if (splitted.size() == 2) { |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
102 def (key, value) = splitted |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
103 switch(key.trim()) { |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
104 case VERSION: |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
105 lastVersion = value.trim() |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
106 break |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
107 case BUILD: |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
108 try { |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
109 lastBuild = value != null ? value.trim() as Integer : 0 |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
110 } catch (NumberFormatException) {} |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
111 versions[lastVersion] = lastBuild |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
112 break |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
113 } |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
114 } |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
115 } |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
116 lastVersion = versions[currentVersion] |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
117 if (null == lastVersion) { |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
118 versions[currentVersion] = 0 |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
119 } |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
120 ++versions[currentVersion] |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
121 def outString = '' |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
122 versions.each { v, b -> |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
123 outString += "${VERSION}=${v}\n${BUILD}=${b}\n\n" |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
124 } |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
125 buildNoFile.write(outString) |
17b702648079
version2.7.2 original version.
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
126 versions[currentVersion] |
0
4689cc86d6cb
create TreeViewer2 Repository
Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
127 } |
4689cc86d6cb
create TreeViewer2 Repository
Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
128 |