-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
142 lines (124 loc) · 5.11 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
135
136
137
138
139
140
141
142
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.siteUrl = "https://github.com/ggrell/FlowReactor"
ext.gitUrl = "https://github.com/ggrell/FlowReactor.git"
ext.buildConfig = [
minSdk : 21,
compileSdk: 31,
targetSdk : 31
]
ext.versions = [
kotlin : '1.5.31',
kotlinCoroutines: '1.5.2',
flowBinding : "1.0.0",
lifecycle : '2.4.0',
// Testing
jacoco : '0.8.7',
mockk : "1.10.2",
kluent : "1.68",
detekt : "1.19.0"
]
ext.deps = [
junit : 'junit:junit:4.13',
kotlin : [
stdlib : [
common: "org.jetbrains.kotlin:kotlin-stdlib-common:${versions.kotlin}",
jdk : "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${versions.kotlin}",
],
test : [
common : "org.jetbrains.kotlin:kotlin-test-common:${versions.kotlin}",
annotations: "org.jetbrains.kotlin:kotlin-test-annotations-common:${versions.kotlin}",
jvm : "org.jetbrains.kotlin:kotlin-test:${versions.kotlin}",
junit : "org.jetbrains.kotlin:kotlin-test-junit:${versions.kotlin}",
reflect : "org.jetbrains.kotlin:kotlin-reflect:${versions.kotlin}",
],
coroutines: [
core : "org.jetbrains.kotlinx:kotlinx-coroutines-core:${versions.kotlinCoroutines}",
native : "org.jetbrains.kotlinx:kotlinx-coroutines-core-native:${versions.kotlinCoroutines}",
android: "org.jetbrains.kotlinx:kotlinx-coroutines-android:${versions.kotlinCoroutines}",
test : "org.jetbrains.kotlinx:kotlinx-coroutines-test:${versions.kotlinCoroutines}",
],
],
bindings: [
lifecycle: "io.github.reactivecircus.flowbinding:flowbinding-lifecycle:${versions.flowBinding}",
activity : "io.github.reactivecircus.flowbinding:flowbinding-activity:${versions.flowBinding}",
android : "io.github.reactivecircus.flowbinding:flowbinding-android:${versions.flowBinding}",
],
support : [
core : "androidx.core:core-ktx:1.2.0",
annotations : "androidx.annotation:annotation:1.1.0",
fragment : "androidx.fragment:fragment-ktx:1.2.4",
appcompat : "androidx.appcompat:appcompat:1.1.0",
activity : "androidx.activity:activity-ktx:1.1.0",
design : "com.google.android.material:material:1.2.1",
constraintlayout: 'androidx.constraintlayout:constraintlayout:1.1.3',
lifecycle : [
runtime : "androidx.lifecycle:lifecycle-runtime-ktx:${versions.lifecycle}",
viewModel: "androidx.lifecycle:lifecycle-viewmodel-ktx:${versions.lifecycle}",
],
],
mockk : "io.mockk:mockk:${versions.mockk}",
kluent : "org.amshove.kluent:kluent:${versions.kluent}",
]
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$versions.kotlin"
}
}
plugins {
id "io.gitlab.arturbosch.detekt" version "1.19.0"
id "org.jetbrains.dokka" version "1.6.0"
}
allprojects {
repositories {
google()
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
subprojects {
apply plugin: "maven-publish"
apply plugin: "signing"
group = "com.gyurigrell"
def isRelease = Boolean.valueOf(project.hasProperty("release") ? project.property("release") as String : "false")
version = "0.9.1" + (isRelease ? "" : "-SNAPSHOT")
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) {
kotlinOptions {
jvmTarget = "1.8"
}
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/ggrell/FlowReactor")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("USERNAME")
password = project.findProperty("gpr.key") ?: System.getenv("TOKEN")
}
}
maven {
name = "MavenCentralSnapshots"
url = uri("https://oss.sonatype.org/content/repositories/snapshots")
credentials {
username = project.findProperty("ossrh.username")
password = project.findProperty("ossrh.password")
}
}
maven {
name = "MavenCentralReleases"
url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2")
credentials {
username = project.findProperty("ossrh.username")
password = project.findProperty("ossrh.password")
}
}
}
}
}