-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
62 lines (52 loc) · 1.65 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
buildscript {
ext.kotlin_version = '1.2.10'
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
ext.euklid_version = 'd5b4c53ccd'
ext.react_version = 'afb412c977'
version = '1.0-SNAPSHOT'
repositories {
mavenCentral()
mavenLocal()
maven { url 'https://jitpack.io' }
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
}
/**
* Define a function here that should be called by all sub-projects that want to be
* published.
* The problem with configuring all here was that the sourcesJar was always resolved
* in the context of this root project.
*/
ext.configurePublishing = { sourcesJar ->
apply plugin: 'maven-publish'
publishing {
publications {
myPublication(MavenPublication) {
from components.java
groupId 'com.github.cdietze.klay'
artifactId project.name
version project.version
artifact sourcesJar
}
}
}
}
}
apply plugin: 'kotlin-platform-common'
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-common:$kotlin_version"
compile "com.github.cdietze.euklid:euklid:$euklid_version"
compile "com.github.cdietze.react-kt:react-kt:$react_version"
testCompile "org.jetbrains.kotlin:kotlin-test-common:$kotlin_version"
}
task sourcesJar(type: Jar) {
classifier "sources"
from sourceSets.main.allSource
}
configurePublishing(sourcesJar)