blob: 508c0449030dfb800f2f4c4ed65e22e895120a18 [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()
Leonid Startsev6fbc2152017-09-21 16:18:32 +030010 mavenLocal()
Leonid Startsev1e737f22017-09-14 13:19:32 +030011 maven { url serializationRepo }
12 maven { url eapChannel }
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"
Leonid Startsevd79fb1f2017-09-15 18:02:59 +030017 classpath "org.jetbrains.kotlinx:kotlinx-gradle-serialization-plugin:$serializationPluginVersion"
Leonid Startsev1e737f22017-09-14 13:19:32 +030018
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')]) {
Leonid Startsevd79fb1f2017-09-15 18:02:59 +030045 apply plugin: 'kotlinx-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 Startsevd79fb1f2017-09-15 18:02:59 +030050 def varintName = ""
51
52 if (project.name == "jvm") {
53 varintName = "${rootProject.name}"
54 } else {
55 varintName = "${rootProject.name}-${project.name}"
56 }
Leonid Startseva5873932017-08-09 11:36:01 +030057
Leonid Startsev00dd4f52017-08-23 16:09:21 +030058 task sourceJar(type: Jar, dependsOn: classes) {
59 classifier 'sources'
60 from sourceSets.main.allSource
61 }
Leonid Startseva5873932017-08-09 11:36:01 +030062
Leonid Startsev00dd4f52017-08-23 16:09:21 +030063 tasks.withType(Jar) {
64 archivesBaseName = varintName
65 }
Leonid Startseva5873932017-08-09 11:36:01 +030066
Leonid Startsev00dd4f52017-08-23 16:09:21 +030067 publishing {
68 publications {
Leonid Startsev1e737f22017-09-14 13:19:32 +030069 mavenProject(MavenPublication) {
Leonid Startsev00dd4f52017-08-23 16:09:21 +030070 from components.java
71 groupId project.group
72 artifactId varintName
73 version project.version
74
75 artifact sourceJar {
76 classifier "sources"
77 }
Leonid Startseva5873932017-08-09 11:36:01 +030078 }
Leonid Startsev08d3ca02017-07-26 15:16:23 +030079 }
80 }
Leonid Startsev1e737f22017-09-14 13:19:32 +030081
82 bintray {
83 user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
84 key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
85 publications = ['mavenProject']
86 pkg {
87 repo = 'kotlinx'
88 name = 'kotlinx.serialization.runtime'
89 userOrg = 'kotlin'
90 licenses = ['Apache-2.0']
91 vcsUrl = 'https://github.com/Kotlin/kotlinx.serialization'
92 websiteUrl = 'https://github.com/Kotlin/kotlinx.serialization'
93 issueTrackerUrl = 'https://github.com/Kotlin/kotlinx.serialization/issues'
94
95 githubRepo = 'Kotlin/kotlinx.serialization'
96 version {
97 name = project.version
98 }
99 }
100 }
Leonid Startsev08d3ca02017-07-26 15:16:23 +0300101}