forked from Kotlin/anko
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
132 lines (114 loc) · 4.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
128
129
130
131
132
import java.util.zip.ZipEntry
import java.util.zip.ZipOutputStream
buildscript {
ext.kotlin_version = '1.1.0'
ext.kotlinx_dom_version = '0.0.10'
ext.kotlinx_coroutines_version = '0.15'
ext.ANKO_VERSION = '0.10.4'
ext.ANKO_VERSION_CODE = 104
ext.COMPILE_SDK_VERSION = 25
ext.BUILD_TOOLS_VERSION = "25.0.2"
ext.MIN_SDK_VERSION = 15
ext.TARGET_SDK_VERSION = 25
ext.SUPPORT_ARTIFACT_VERSION = "25.1.1"
ext.CONSTRAINT_LAYOUT_ARTIFACT_VERSION = "1.1.0-beta4"
ext.PROJECT_URL = 'https://github.com/JetBrains/anko'
ext.SCM_URL = 'https://github.com/JetBrains/anko.git'
ext.CONNECTION_URL = 'scm:git:https://github.com/JetBrains/anko.git'
ext.DEVELOPER_CONNECTION_URL = 'scm:git:https://github.com/JetBrains/anko'
ext.BINTRAY_USER_NAME = 'jetbrains'
ext.BINTRAY_PACKAGE_NAME = 'anko'
ext.BINTRAY_REPO_NAME = 'anko'
ext.BINTRAY_DRY_RUN = false
ext.POM_ARTIFACT_GROUP = 'org.jetbrains.anko'
repositories {
mavenCentral()
jcenter()
maven { url "http://dl.bintray.com/kotlin/kotlin-eap-1.1" }
}
dependencies {
classpath "com.android.tools.build:gradle:2.1.0"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7'
classpath "org.jetbrains.dokka:dokka-android-gradle-plugin:0.9.11"
}
}
allprojects {
repositories {
mavenCentral()
jcenter()
maven { url "https://dl.google.com/dl/android/maven2" }
maven { url "http://dl.bintray.com/kotlin/kotlinx.dom" }
maven { url "http://dl.bintray.com/kotlin/kotlin-eap-1.1" }
}
}
task zipIdeaPlugin(dependsOn: ':ide:preview:shadowJar') << {
File outputFile = new File("build/anko-ide-plugin.zip")
ZipOutputStream zipOutputStream = null
try {
zipOutputStream = new ZipOutputStream(new FileOutputStream(outputFile))
ZipEntry jar = new ZipEntry("Anko/lib/anko-ide-plugin.jar")
zipOutputStream.putNextEntry(jar)
zipOutputStream << new FileInputStream("anko/idea-plugin/preview/build/libs/preview-all.jar")
} finally {
if (zipOutputStream != null) {
zipOutputStream.close()
}
}
}
def generatedArtifacts = [
':generated:anko-appcompat-v7',
':generated:anko-appcompat-v7-listeners',
':generated:anko-appcompat-v7-coroutines',
':generated:anko-appcompat-v7-commons',
':generated:anko-cardview-v7',
':generated:anko-common',
':generated:anko-commons',
':generated:anko-design',
':generated:anko-design-listeners',
':generated:anko-design-coroutines',
':generated:anko-gridlayout-v7',
':generated:anko-percent',
':generated:anko-constraint-layout',
':generated:anko-recyclerview-v7',
':generated:anko-recyclerview-v7-listeners',
':generated:anko-recyclerview-v7-coroutines',
':generated:anko-sdk15',
':generated:anko-sdk15-listeners',
':generated:anko-sdk15-coroutines',
':generated:anko-sdk19',
':generated:anko-sdk19-listeners',
':generated:anko-sdk19-coroutines',
':generated:anko-sdk21',
':generated:anko-sdk21-listeners',
':generated:anko-sdk21-coroutines',
':generated:anko-sdk23',
':generated:anko-sdk23-listeners',
':generated:anko-sdk23-coroutines',
':generated:anko-sdk25',
':generated:anko-sdk25-listeners',
':generated:anko-sdk25-coroutines',
':generated:anko-sqlite',
':generated:anko-support-v4',
':generated:anko-support-v4-commons',
':generated:anko-coroutines',
':generated:anko'
]
task dist()
task publish()
task publishLocal()
afterEvaluate {
def commonBuildTasks = [
':zipIdeaPlugin',
':generator:run',
':generator:test',
':robolectricTests:test'
]
project.tasks.dist.dependsOn(commonBuildTasks)
project.tasks.publish.dependsOn(commonBuildTasks)
project.tasks.publishLocal.dependsOn(commonBuildTasks)
project.tasks.dist.dependsOn(generatedArtifacts.collect { it + ":assembleRelease" })
project.tasks.publish.dependsOn(generatedArtifacts.collect { it + ":bintrayUpload" })
project.tasks.publishLocal.dependsOn(generatedArtifacts.collect { it + ":publish" })
}