forked from Cocoanetics/DTFoundation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
127 lines (96 loc) · 2.26 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
buildscript {
repositories {
maven {
url('http://openbakery.org/repository/')
}
mavenCentral()
}
dependencies {
classpath group: 'org.openbakery', name: 'xcodePlugin', version: '0.9.+'
}
}
apply plugin: 'xcode'
repositories {
mavenCentral()
}
configurations {
ftpAntTask
}
dependencies {
ftpAntTask("org.apache.ant:ant-commons-net:1.9.+");
}
ant.taskdef(
name: 'ftp',
classname: 'org.apache.tools.ant.taskdefs.optional.net.FTP',
classpath: configurations.ftpAntTask.asPath
)
xcodebuild {
scheme = 'Static Library'
target = 'Static Library'
configuration = 'Debug'
}
task documentationUpload << {
def uploadHost = 'docs.cocoanetics.com'
if (project.ext.properties.containsKey("uploadHost")) {
uploadHost = project.ext.uploadHost
}
def uploadUser = null
if (project.ext.properties.containsKey("uploadUser")) {
uploadUser = project.ext.uploadUser
} else {
uploadUser = System.console().readLine("\nPlease enter the upload user: ")
}
def uploadPassword = null
if (project.ext.properties.containsKey("uploadPassword")) {
uploadPassword = project.ext.uploadPassword
} else {
uploadPassword = "" + System.console().readPassword("\nPlease enter the upload server password: ")
}
def uploadDirectory = 'DTFoundation'
if (project.ext.properties.containsKey("uploadDirectory")) {
uploadDirectory = project.ext.uploadDirectory
}
ant.ftp(
server: uploadHost,
remotedir: uploadDirectory,
userid: uploadUser,
password: uploadPassword,
depends: true,
verbose: true,
passive: true) {
fileset(dir: 'build/documentation/html') {
include(name: '**/**')
}
fileset(dir: 'build/documentation/publish') {
include(name: '**/**')
}
}
}
task continuous(dependsOn: 'test')
gradle.taskGraph.whenReady { taskGraph ->
if (taskGraph.hasTask(test)) {
println "CONFIGURE CONTINUOUS"
xcodebuild {
destination {
platform = 'iOS Simulator'
name = 'iPad'
os='7.1'
}
destination {
platform = 'iOS Simulator'
name = 'iPhone Retina (3.5-inch)'
os='7.1'
}
destination {
platform = 'iOS Simulator'
name = 'iPhone Retina (4-inch)'
os='7.1'
}
destination {
platform = 'iOS Simulator'
name = 'iPad Retina'
os='7.1'
}
}
}
}