blob: 0681ddb0727aee8529fb04fcf16616d50b8c164f [file] [log] [blame]
Leonid Startsev08d3ca02017-07-26 15:16:23 +03001buildscript {
Leonid Startsev1e737f22017-09-14 13:19:32 +03002 ext.compilerVersion = '1.1.50-eap-18'
3 ext.librariesVersion = '1.1.50-eap-18'
4 ext.eapChannel = 'https://dl.bintray.com/kotlin/kotlin-eap-1.1'
5 ext.serializationRepo = 'https://kotlin.bintray.com/kotlinx'
6 ext.serializationPluginVersion = '0.1'
Leonid Startsev08d3ca02017-07-26 15:16:23 +03007
8 repositories {
Leonid Startsev1e737f22017-09-14 13:19:32 +03009 jcenter()
10 maven { url serializationRepo }
11 maven { url eapChannel }
Leonid Startseved87fbd2017-08-04 17:33:09 +030012 mavenLocal()
Leonid Startsev08d3ca02017-07-26 15:16:23 +030013 }
14
15 dependencies {
Leonid Startsev1e737f22017-09-14 13:19:32 +030016 classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$compilerVersion"
17 classpath "org.jetbrains.kotlinx:kotlin-serialization:$serializationPluginVersion"
18
Leonid Startseved87fbd2017-08-04 17:33:09 +030019 classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.2'
Leonid Startsev1e737f22017-09-14 13:19:32 +030020
21 classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
Leonid Startsev08d3ca02017-07-26 15:16:23 +030022 }
23}
24
Leonid Startsev00dd4f52017-08-23 16:09:21 +030025ext {
26 libraries = [
Leonid Startsev1e737f22017-09-14 13:19:32 +030027 kotlin_stdlib: "org.jetbrains.kotlin:kotlin-stdlib:$librariesVersion",
28 kotlin_stdlib_common: "org.jetbrains.kotlin:kotlin-stdlib-common:$librariesVersion",
29 kotlin_stdlib_js: "org.jetbrains.kotlin:kotlin-stdlib-js:$librariesVersion",
30 kotlin_test: "org.jetbrains.kotlin:kotlin-test:$librariesVersion",
31 kotlin_test_common: "org.jetbrains.kotlin:kotlin-test-common:$librariesVersion",
32 kotlin_test_js: "org.jetbrains.kotlin:kotlin-test-js:$librariesVersion",
33 kotlin_reflect: "org.jetbrains.kotlin:kotlin-reflect:$librariesVersion",
Leonid Startsev00dd4f52017-08-23 16:09:21 +030034 ]
35}
36
37allprojects {
38 group 'org.jetbrains.kotlinx'
Leonid Startsev1e737f22017-09-14 13:19:32 +030039 version '0.1'
Leonid Startsev00dd4f52017-08-23 16:09:21 +030040}
Leonid Startsev08d3ca02017-07-26 15:16:23 +030041
Leonid Startsev08d3ca02017-07-26 15:16:23 +030042apply plugin: 'kotlin'
Leonid Startsev08d3ca02017-07-26 15:16:23 +030043
Leonid Startsev00dd4f52017-08-23 16:09:21 +030044configure([project(':jvm'), project(':js')]) {
45 apply plugin: 'kotlin-serialization'
Leonid Startsev08d3ca02017-07-26 15:16:23 +030046
Leonid Startsev00dd4f52017-08-23 16:09:21 +030047 apply plugin: 'maven-publish'
Leonid Startsev1e737f22017-09-14 13:19:32 +030048 apply plugin: 'com.jfrog.bintray'
Leonid Startseved87fbd2017-08-04 17:33:09 +030049
Leonid Startsev00dd4f52017-08-23 16:09:21 +030050 def varintName = "${rootProject.name}-${project.name}"
Leonid Startseva5873932017-08-09 11:36:01 +030051
Leonid Startsev00dd4f52017-08-23 16:09:21 +030052 task sourceJar(type: Jar, dependsOn: classes) {
53 classifier 'sources'
54 from sourceSets.main.allSource
55 }
Leonid Startseva5873932017-08-09 11:36:01 +030056
Leonid Startsev00dd4f52017-08-23 16:09:21 +030057 tasks.withType(Jar) {
58 archivesBaseName = varintName
59 }
Leonid Startseva5873932017-08-09 11:36:01 +030060
Leonid Startsev00dd4f52017-08-23 16:09:21 +030061 publishing {
62 publications {
Leonid Startsev1e737f22017-09-14 13:19:32 +030063 mavenProject(MavenPublication) {
Leonid Startsev00dd4f52017-08-23 16:09:21 +030064 from components.java
65 groupId project.group
66 artifactId varintName
67 version project.version
68
69 artifact sourceJar {
70 classifier "sources"
71 }
Leonid Startseva5873932017-08-09 11:36:01 +030072 }
Leonid Startsev08d3ca02017-07-26 15:16:23 +030073 }
74 }
Leonid Startsev1e737f22017-09-14 13:19:32 +030075
76 bintray {
77 user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
78 key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
79 publications = ['mavenProject']
80 pkg {
81 repo = 'kotlinx'
82 name = 'kotlinx.serialization.runtime'
83 userOrg = 'kotlin'
84 licenses = ['Apache-2.0']
85 vcsUrl = 'https://github.com/Kotlin/kotlinx.serialization'
86 websiteUrl = 'https://github.com/Kotlin/kotlinx.serialization'
87 issueTrackerUrl = 'https://github.com/Kotlin/kotlinx.serialization/issues'
88
89 githubRepo = 'Kotlin/kotlinx.serialization'
90 version {
91 name = project.version
92 }
93 }
94 }
Leonid Startsev08d3ca02017-07-26 15:16:23 +030095}