forked from Cocoanetics/DTRichTextEditor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
114 lines (90 loc) · 2.34 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
buildscript {
repositories {
maven {
url('http://repository.openbakery.org/')
}
mavenCentral()
}
dependencies {
classpath "org.openbakery:xcode-plugin:0.12.+"
}
}
apply plugin: "org.openbakery.xcode-plugin"
xcodebuild {
scheme = 'Demo App'
target = 'Demo App'
destination = [ 'iPad 2', 'iPhone 6' ] // used when running unit tests
}
task DemoApp {
dependsOn.add('xcodebuild')
}
task DTRichTextEditor {
dependsOn.add('xcodebuild')
}
gradle.taskGraph.whenReady { taskGraph ->
if (taskGraph.hasTask(DemoApp)) {
xcodebuild {
scheme = 'Demo App'
}
}
if (taskGraph.hasTask(DemoApp)) {
xcodebuild {
scheme = 'DTRichTextEditor (iOS)'
}
}
}
// ---------- FTP PUBLISH ----------
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
)
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: ")
}
// -------------- UPLOAD DIRECTORY -------------
def uploadDirectory = 'DTRichTextEditor'
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: '**/**')
}
}
}
appledoc.onlyIf { project.hasProperty('buildBranch-master') }
documentationUpload.onlyIf { project.hasProperty('buildBranch-master') }