Leonid Startsev | 08d3ca0 | 2017-07-26 15:16:23 +0300 | [diff] [blame] | 1 | buildscript { |
Leonid Startsev | 1e737f2 | 2017-09-14 13:19:32 +0300 | [diff] [blame] | 2 | 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 Startsev | 08d3ca0 | 2017-07-26 15:16:23 +0300 | [diff] [blame] | 7 | |
| 8 | repositories { |
Leonid Startsev | 1e737f2 | 2017-09-14 13:19:32 +0300 | [diff] [blame] | 9 | jcenter() |
Leonid Startsev | 6fbc215 | 2017-09-21 16:18:32 +0300 | [diff] [blame^] | 10 | mavenLocal() |
Leonid Startsev | 1e737f2 | 2017-09-14 13:19:32 +0300 | [diff] [blame] | 11 | maven { url serializationRepo } |
| 12 | maven { url eapChannel } |
Leonid Startsev | 08d3ca0 | 2017-07-26 15:16:23 +0300 | [diff] [blame] | 13 | } |
| 14 | |
| 15 | dependencies { |
Leonid Startsev | 1e737f2 | 2017-09-14 13:19:32 +0300 | [diff] [blame] | 16 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$compilerVersion" |
Leonid Startsev | d79fb1f | 2017-09-15 18:02:59 +0300 | [diff] [blame] | 17 | classpath "org.jetbrains.kotlinx:kotlinx-gradle-serialization-plugin:$serializationPluginVersion" |
Leonid Startsev | 1e737f2 | 2017-09-14 13:19:32 +0300 | [diff] [blame] | 18 | |
Leonid Startsev | ed87fbd | 2017-08-04 17:33:09 +0300 | [diff] [blame] | 19 | classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.2' |
Leonid Startsev | 1e737f2 | 2017-09-14 13:19:32 +0300 | [diff] [blame] | 20 | |
| 21 | classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3' |
Leonid Startsev | 08d3ca0 | 2017-07-26 15:16:23 +0300 | [diff] [blame] | 22 | } |
| 23 | } |
| 24 | |
Leonid Startsev | 00dd4f5 | 2017-08-23 16:09:21 +0300 | [diff] [blame] | 25 | ext { |
| 26 | libraries = [ |
Leonid Startsev | 1e737f2 | 2017-09-14 13:19:32 +0300 | [diff] [blame] | 27 | 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 Startsev | 00dd4f5 | 2017-08-23 16:09:21 +0300 | [diff] [blame] | 34 | ] |
| 35 | } |
| 36 | |
| 37 | allprojects { |
| 38 | group 'org.jetbrains.kotlinx' |
Leonid Startsev | 1e737f2 | 2017-09-14 13:19:32 +0300 | [diff] [blame] | 39 | version '0.1' |
Leonid Startsev | 00dd4f5 | 2017-08-23 16:09:21 +0300 | [diff] [blame] | 40 | } |
Leonid Startsev | 08d3ca0 | 2017-07-26 15:16:23 +0300 | [diff] [blame] | 41 | |
Leonid Startsev | 08d3ca0 | 2017-07-26 15:16:23 +0300 | [diff] [blame] | 42 | apply plugin: 'kotlin' |
Leonid Startsev | 08d3ca0 | 2017-07-26 15:16:23 +0300 | [diff] [blame] | 43 | |
Leonid Startsev | 00dd4f5 | 2017-08-23 16:09:21 +0300 | [diff] [blame] | 44 | configure([project(':jvm'), project(':js')]) { |
Leonid Startsev | d79fb1f | 2017-09-15 18:02:59 +0300 | [diff] [blame] | 45 | apply plugin: 'kotlinx-serialization' |
Leonid Startsev | 08d3ca0 | 2017-07-26 15:16:23 +0300 | [diff] [blame] | 46 | |
Leonid Startsev | 00dd4f5 | 2017-08-23 16:09:21 +0300 | [diff] [blame] | 47 | apply plugin: 'maven-publish' |
Leonid Startsev | 1e737f2 | 2017-09-14 13:19:32 +0300 | [diff] [blame] | 48 | apply plugin: 'com.jfrog.bintray' |
Leonid Startsev | ed87fbd | 2017-08-04 17:33:09 +0300 | [diff] [blame] | 49 | |
Leonid Startsev | d79fb1f | 2017-09-15 18:02:59 +0300 | [diff] [blame] | 50 | def varintName = "" |
| 51 | |
| 52 | if (project.name == "jvm") { |
| 53 | varintName = "${rootProject.name}" |
| 54 | } else { |
| 55 | varintName = "${rootProject.name}-${project.name}" |
| 56 | } |
Leonid Startsev | a587393 | 2017-08-09 11:36:01 +0300 | [diff] [blame] | 57 | |
Leonid Startsev | 00dd4f5 | 2017-08-23 16:09:21 +0300 | [diff] [blame] | 58 | task sourceJar(type: Jar, dependsOn: classes) { |
| 59 | classifier 'sources' |
| 60 | from sourceSets.main.allSource |
| 61 | } |
Leonid Startsev | a587393 | 2017-08-09 11:36:01 +0300 | [diff] [blame] | 62 | |
Leonid Startsev | 00dd4f5 | 2017-08-23 16:09:21 +0300 | [diff] [blame] | 63 | tasks.withType(Jar) { |
| 64 | archivesBaseName = varintName |
| 65 | } |
Leonid Startsev | a587393 | 2017-08-09 11:36:01 +0300 | [diff] [blame] | 66 | |
Leonid Startsev | 00dd4f5 | 2017-08-23 16:09:21 +0300 | [diff] [blame] | 67 | publishing { |
| 68 | publications { |
Leonid Startsev | 1e737f2 | 2017-09-14 13:19:32 +0300 | [diff] [blame] | 69 | mavenProject(MavenPublication) { |
Leonid Startsev | 00dd4f5 | 2017-08-23 16:09:21 +0300 | [diff] [blame] | 70 | from components.java |
| 71 | groupId project.group |
| 72 | artifactId varintName |
| 73 | version project.version |
| 74 | |
| 75 | artifact sourceJar { |
| 76 | classifier "sources" |
| 77 | } |
Leonid Startsev | a587393 | 2017-08-09 11:36:01 +0300 | [diff] [blame] | 78 | } |
Leonid Startsev | 08d3ca0 | 2017-07-26 15:16:23 +0300 | [diff] [blame] | 79 | } |
| 80 | } |
Leonid Startsev | 1e737f2 | 2017-09-14 13:19:32 +0300 | [diff] [blame] | 81 | |
| 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 Startsev | 08d3ca0 | 2017-07-26 15:16:23 +0300 | [diff] [blame] | 101 | } |