-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
119 lines (103 loc) · 2.77 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
plugins {
id 'org.jetbrains.kotlin.js' version '1.3.61'
id 'pl.allegro.tech.build.axion-release' version '1.11.0'
id "com.jfrog.bintray" version "1.8.4"
id "com.jfrog.artifactory" version "4.15.2"
}
apply plugin: "maven-publish"
group 'io.akryl'
version scmVersion.version
repositories {
mavenLocal()
maven { url = "https://dl.bintray.com/kotlin/kotlin-eap" }
maven { url = "https://dl.bintray.com/kotlin/kotlin-dev" }
mavenCentral()
jcenter()
}
kotlin {
target {
browser {
testTask {
useKarma {
useChromeHeadless()
}
}
}
}
sourceSets {
main {
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-js"
implementation "io.akryl:akryl-core:0.+"
implementation npm("babel-loader", "8.0.6")
implementation npm("@babel/core", "7.7.7")
implementation npm("@babel/preset-env", "7.7.7")
implementation npm("babel-plugin-akryl", "0.1.1")
implementation npm("react", "16.12.0")
implementation npm("react-dom", "16.12.0")
implementation npm("react-test-renderer", "16.12.0")
}
}
}
}
dependencies {
testImplementation "org.jetbrains.kotlin:kotlin-test-js"
}
compileKotlinJs {
kotlinOptions {
freeCompilerArgs += "-Xuse-experimental=kotlin.experimental.ExperimentalTypeInference"
}
}
task sourcesJar(type: Jar) {
classifier = "sources"
from "src/main/kotlin"
}
publishing {
publications {
maven(MavenPublication) {
groupId = project.group
artifactId = project.name
version = project.version
from components.kotlin
artifact sourcesJar
}
}
}
artifacts {
archives sourcesJar
}
bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_KEY')
publications = ['maven']
dryRun = project.version.endsWith('SNAPSHOT')
publish = true
pkg {
repo = 'akryl'
name = project.name
vcsUrl = "https://github.com/akryl-kt/${project.name}.git"
licenses = ['MIT']
version {
name = project.version
desc = project.name
released = new Date()
vcsTag = project.version
}
}
}
artifactoryPublish {
skip = !project.version.endsWith('SNAPSHOT')
}
artifactory {
contextUrl = 'http://oss.jfrog.org'
publish {
repository {
repoKey = 'oss-snapshot-local'
username = System.getenv('BINTRAY_USER')
password = System.getenv('BINTRAY_KEY')
}
defaults {
publications('maven')
}
}
}