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() |
| 10 | maven { url serializationRepo } |
| 11 | maven { url eapChannel } |
Leonid Startsev | ed87fbd | 2017-08-04 17:33:09 +0300 | [diff] [blame] | 12 | mavenLocal() |
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" |
| 17 | classpath "org.jetbrains.kotlinx:kotlin-serialization:$serializationPluginVersion" |
| 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')]) { |
| 45 | apply plugin: 'kotlin-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 | 00dd4f5 | 2017-08-23 16:09:21 +0300 | [diff] [blame] | 50 | def varintName = "${rootProject.name}-${project.name}" |
Leonid Startsev | a587393 | 2017-08-09 11:36:01 +0300 | [diff] [blame] | 51 | |
Leonid Startsev | 00dd4f5 | 2017-08-23 16:09:21 +0300 | [diff] [blame] | 52 | task sourceJar(type: Jar, dependsOn: classes) { |
| 53 | classifier 'sources' |
| 54 | from sourceSets.main.allSource |
| 55 | } |
Leonid Startsev | a587393 | 2017-08-09 11:36:01 +0300 | [diff] [blame] | 56 | |
Leonid Startsev | 00dd4f5 | 2017-08-23 16:09:21 +0300 | [diff] [blame] | 57 | tasks.withType(Jar) { |
| 58 | archivesBaseName = varintName |
| 59 | } |
Leonid Startsev | a587393 | 2017-08-09 11:36:01 +0300 | [diff] [blame] | 60 | |
Leonid Startsev | 00dd4f5 | 2017-08-23 16:09:21 +0300 | [diff] [blame] | 61 | publishing { |
| 62 | publications { |
Leonid Startsev | 1e737f2 | 2017-09-14 13:19:32 +0300 | [diff] [blame^] | 63 | mavenProject(MavenPublication) { |
Leonid Startsev | 00dd4f5 | 2017-08-23 16:09:21 +0300 | [diff] [blame] | 64 | from components.java |
| 65 | groupId project.group |
| 66 | artifactId varintName |
| 67 | version project.version |
| 68 | |
| 69 | artifact sourceJar { |
| 70 | classifier "sources" |
| 71 | } |
Leonid Startsev | a587393 | 2017-08-09 11:36:01 +0300 | [diff] [blame] | 72 | } |
Leonid Startsev | 08d3ca0 | 2017-07-26 15:16:23 +0300 | [diff] [blame] | 73 | } |
| 74 | } |
Leonid Startsev | 1e737f2 | 2017-09-14 13:19:32 +0300 | [diff] [blame^] | 75 | |
| 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 Startsev | 08d3ca0 | 2017-07-26 15:16:23 +0300 | [diff] [blame] | 95 | } |