-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
134 lines (106 loc) · 3.38 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
128
129
130
131
132
133
134
task wrapper(type: Wrapper) {
gradleVersion = 2.4
}
apply plugin: 'release'
release {
failOnSnapshotDependencies = true
allowLocalModifications = true
releaseDryRun = false
scm = 'git'
}
allprojects {
group = "com.deviceatlas"
version = release.projectVersion
}
buildscript {
repositories {
maven {
url mavenRepoUrl
}
}
dependencies {
classpath 'au.com.ish.gradle:release:2.1'
}
}
project.ext {
tmpDir = "${buildDir}/tmp"
zipDir = "${buildDir}/cloud-java"
cloudJavaDirectory = "${zipDir}/deviceatlas-cloud-java-${version}"
documentationDirectory = "${cloudJavaDirectory}/Documentation"
apiDirectory = "${cloudJavaDirectory}/Api"
thirdpartyDirectory = "${apiDirectory}/thirdparty"
examplesDirectory = "${cloudJavaDirectory}/Examples"
clientPropsDirectory = "${cloudJavaDirectory}/ExtraTools/ClientSideProperties"
ehCacheVersion = "1.6.2"
ehCacheDocsDirectory = "ehcache-${ehCacheVersion}"
clientSideVersion = "1.3"
}
configurations {
examples { transitive = false }
slf4j
}
dependencies {
examples project(":deviceatlas-cloud-java-examples")
slf4j "org.slf4j:slf4j-api:1.7.13"
slf4j "ch.qos.logback:logback-core:1.1.3"
slf4j "ch.qos.logback:logback-classic:1.1.3"
}
task copyApiConfig(type: Copy) {
from "deviceatlas-cloud-java-client/config"
into "$apiDirectory/config"
}
task copyDependencies(type: Copy, dependsOn: ":deviceatlas-cloud-java-client:jar") {
from configurations.slf4j
into "$apiDirectory"
}
task copyApiJar(type: Copy, dependsOn: copyDependencies) {
from "deviceatlas-cloud-java-client/build/libs/deviceatlas-cloud-java-client-${version}.jar"
into "$apiDirectory"
}
task buildApiDirectory(dependsOn: [copyApiConfig, copyApiJar])
task copyJavaDocs(type: Copy, dependsOn: ":deviceatlas-cloud-java-client:javadoc") {
from "deviceatlas-cloud-java-client/build/docs"
into "${documentationDirectory}"
}
task addChangelog(type: Copy) {
from("${projectDir}") {
include 'CHANGELOG'
}
into "${cloudJavaDirectory}"
}
task addExtraTools(type: Copy) {
from("${projectDir}/ExtraTools/ClientSideProperties") {
include '**/*'
}
into "${clientPropsDirectory}"
}
task copyExamples(type: Copy) {
from("deviceatlas-cloud-java-examples/src") {
include '**/*.jsp'
filter {
line -> line.replaceAll("deviceatlas-VERSION.min.js","deviceatlas-${clientSideVersion}.min.js")
}
filter {
line -> line.replaceAll("deviceatlas-cloud-java-client-VERSION.jar","deviceatlas-cloud-java-client-${version}.jar")
}
}
from("deviceatlas-cloud-java-examples/src") {
include '**/build.xml'
filter {
line -> line.replaceAll("deviceatlas-cloud-java-client-VERSION.jar","deviceatlas-cloud-java-client-${version}.jar")
}
}
from("deviceatlas-cloud-java-examples/src") {
include '**/*.java'
filter {
line -> line.replaceAll("deviceatlas-cloud-java-client-VERSION.jar","deviceatlas-cloud-java-client-${version}.jar")
}
}
from("deviceatlas-cloud-java-examples/src") {
exclude '**/*.jsp'
exclude '**/build.xml'
exclude '**/*.java'
}
into "${examplesDirectory}"
}
assemble.dependsOn buildApiDirectory, copyJavaDocs, copyExamples, addChangelog, addExtraTools