@@ -21,19 +21,86 @@ xcodebuild {
21
21
}
22
22
23
23
24
- task continuous ( dependsOn : ' test ' )
24
+ // ---------- FTP Publish ----------
25
25
26
+ repositories {
27
+ mavenCentral()
28
+ }
26
29
30
+ configurations {
31
+ ftpAntTask
32
+ }
33
+
34
+ dependencies {
35
+ ftpAntTask(" org.apache.ant:ant-commons-net:1.9.+" );
36
+ }
37
+
38
+
39
+ ant. taskdef(
40
+ name : ' ftp' ,
41
+ classname : ' org.apache.tools.ant.taskdefs.optional.net.FTP' ,
42
+ classpath : configurations. ftpAntTask. asPath
43
+ )
44
+
45
+ task documentationUpload << {
46
+ def uploadHost = ' docs.cocoanetics.com'
47
+ if (project. ext. properties. containsKey(" uploadHost" )) {
48
+ uploadHost = project. ext. uploadHost
49
+ }
50
+
51
+ def uploadUser = null
52
+ if (project. ext. properties. containsKey(" uploadUser" )) {
53
+ uploadUser = project. ext. uploadUser
54
+ } else {
55
+ uploadUser = System . console(). readLine(" \n Please enter the upload user: " )
56
+ }
57
+
58
+ def uploadPassword = null
59
+ if (project. ext. properties. containsKey(" uploadPassword" )) {
60
+ uploadPassword = project. ext. uploadPassword
61
+ } else {
62
+ uploadPassword = " " + System . console(). readPassword(" \n Please enter the upload server password: " )
63
+ }
64
+
65
+
66
+ // -------------- UPLOAD DIRECTORY -------------
67
+
68
+ def uploadDirectory = ' DTCoreText'
69
+ if (project. ext. properties. containsKey(" uploadDirectory" )) {
70
+ uploadDirectory = project. ext. uploadDirectory
71
+ }
72
+
73
+
74
+ ant. ftp(
75
+ server : uploadHost,
76
+ remotedir : uploadDirectory,
77
+ userid : uploadUser,
78
+ password : uploadPassword,
79
+ depends : true ,
80
+ verbose : true ,
81
+ passive : true ) {
82
+
83
+ fileset(dir : ' build/documentation/html' ) {
84
+ include(name : ' **/**' )
85
+ }
86
+ fileset(dir : ' build/documentation/publish' ) {
87
+ include(name : ' **/**' )
88
+ }
89
+ }
90
+
91
+ }
27
92
28
- gradle. taskGraph. whenReady { taskGraph ->
29
93
94
+ // ---------- Unit Tests ----------
30
95
96
+ task continuous (dependsOn : ' test' )
31
97
98
+ gradle. taskGraph. whenReady { taskGraph ->
32
99
33
100
if (taskGraph. hasTask(test)) {
34
101
println " CONFIGURE CONTINUOUS"
35
102
xcodebuild {
36
-
103
+
37
104
destination {
38
105
platform = ' iOS Simulator'
39
106
name = ' iPad'
@@ -45,7 +112,7 @@ gradle.taskGraph.whenReady { taskGraph ->
45
112
name = ' iPhone Retina (3.5-inch)'
46
113
os= ' 7.1'
47
114
}
48
-
115
+
49
116
destination {
50
117
platform = ' iOS Simulator'
51
118
name = ' iPhone Retina (4-inch)'
@@ -57,9 +124,6 @@ gradle.taskGraph.whenReady { taskGraph ->
57
124
name = ' iPad Retina'
58
125
os= ' 7.1'
59
126
}
60
-
61
-
62
127
}
63
128
}
64
-
65
129
}
0 commit comments