-
Notifications
You must be signed in to change notification settings - Fork 13
/
build.gradle
124 lines (109 loc) · 3.71 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
buildscript {
ext.kotlin_version = '1.8.22'
ext.kiit_version = file('../../version.txt').text
ext.kiit_version_beta = file('../../version-beta.txt').text
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
plugins {
id "java"
id "maven-publish"
id "org.jetbrains.kotlin.jvm" // version "$kotlin_version"
}
apply from: '../../../build/gradle/gradle-utils.gradle'
compileKotlin {
kotlinOptions.jvmTarget = '1.8'
}
compileTestKotlin {
kotlinOptions.jvmTarget = '1.8'
}
compileJava {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
java {
withSourcesJar()
}
repositories {
jcenter()
mavenCentral()
maven {
url "https://maven.pkg.github.com/slatekit/kiit"
credentials {
username = System.getenv('KIIT_INSTALL_ACTOR')
password = System.getenv('KIIT_INSTALL_TOKEN')
}
}
}
ext.kiitSetupViaBinary = System.getenv('KIIT_PROJECT_MODE') != 'sources'
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.1.0'
implementation 'com.squareup.okhttp3:okhttp:3.9.0'
implementation 'org.threeten:threetenbp:1.3.8'
// /* <kiit_local>
if( kiitSetupViaBinary ) {
implementation "dev.kiit:kiit-results:$kiit_version"
implementation "dev.kiit:kiit-common:$kiit_version"
implementation "dev.kiit:kiit-utils:$kiit_version"
} else {
// */
implementation project(":kiit-result")
implementation project(":kiit-common")
implementation project(":kiit-utils")
} //</kiit_local>
}
// ==================================================================
// Slate Kit Component Info
// ==================================================================
def kiitComponentId = 'core'
def kiitComponentName = 'Core'
def kiitComponentDesc = 'Kiit Core: Infrastructure components'
def kiitComponentVersion = ext.kiit_version
// ==================================================================
// Slate Kit Setup mode: defaults to maven vs loading project sources
// ==================================================================
task info {
println('kiit.setup : ' + System.getenv('KIIT_PROJECT_MODE'))
println('kiit.maven : ' + kiitSetupViaBinary)
println('kiit.comp.id : ' + kiitComponentId)
println('kiit.comp.name : ' + kiitComponentName)
println('kiit.comp.desc : ' + kiitComponentDesc)
println('kiit.comp.vers : ' + kiitComponentVersion)
println()
println('project.name : ' + project.name)
println('project.path : ' + project.path)
println('project.desc : ' + project.description)
println('project.projectDir : ' + project.projectDir)
println('project.buildDir : ' + project.buildDir)
println()
println('build.commit : ' + gitCommitId())
println('build.branch : ' + gitBranchName())
println('build.date : ' + getBuildDate())
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = "https://maven.pkg.github.com/slatekit/kiit"
credentials {
username = System.getenv("KIIT_PUBLISH_ACTOR")
password = System.getenv("KIIT_PUBLISH_TOKEN")
}
}
}
publications {
gpr(MavenPublication) {
from(components.java)
groupId 'dev.kiit'
artifactId "kiit-${kiitComponentId}"
version "${kiitComponentVersion}"
}
}
}