blob: 5959deed1f925b8df87717fe322088c524d4a077 [file] [log] [blame]
/*
* Copyright 2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
buildscript {
ext.compilerVersion = '1.1.50'
ext.librariesVersion = '1.1.50'
ext.eapChannel = 'https://dl.bintray.com/kotlin/kotlin-eap-1.1'
ext.serializationRepo = 'https://kotlin.bintray.com/kotlinx'
ext.serializationPluginVersion = '0.1.1'
repositories {
jcenter()
mavenLocal()
maven { url serializationRepo }
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$compilerVersion"
classpath "org.jetbrains.kotlinx:kotlinx-gradle-serialization-plugin:$serializationPluginVersion"
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.2'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
}
}
ext {
libraries = [
kotlin_stdlib: "org.jetbrains.kotlin:kotlin-stdlib:$librariesVersion",
kotlin_stdlib_common: "org.jetbrains.kotlin:kotlin-stdlib-common:$librariesVersion",
kotlin_stdlib_js: "org.jetbrains.kotlin:kotlin-stdlib-js:$librariesVersion",
kotlin_test: "org.jetbrains.kotlin:kotlin-test:$librariesVersion",
kotlin_test_common: "org.jetbrains.kotlin:kotlin-test-common:$librariesVersion",
kotlin_test_js: "org.jetbrains.kotlin:kotlin-test-js:$librariesVersion",
kotlin_reflect: "org.jetbrains.kotlin:kotlin-reflect:$librariesVersion",
]
}
allprojects {
group 'org.jetbrains.kotlinx'
version '0.1.1'
repositories {
jcenter()
mavenLocal()
}
}
apply plugin: 'kotlin'
subprojects {
apply plugin: 'kotlinx-serialization'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
def varintName = ""
if (project.name == "jvm") {
varintName = "${rootProject.name}"
} else {
varintName = "${rootProject.name}-${project.name}"
}
afterEvaluate {
task sourceJar(type: Jar, dependsOn: classes) {
classifier 'sources'
from sourceSets.main.kotlin
duplicatesStrategy = "exclude"
def platformSrc = sourceSets.main.kotlin
def commonSrc = project(':common').sourceSets.main.kotlin
from (platformSrc + commonSrc)
}
}
tasks.withType(Jar) {
archivesBaseName = varintName
}
publishing {
publications {
mavenProject(MavenPublication) {
from components.java
groupId project.group
artifactId varintName
version project.version
artifact sourceJar {
classifier "sources"
}
}
}
}
bintray {
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
publications = ['mavenProject']
pkg {
repo = 'kotlinx'
name = 'kotlinx.serialization.runtime'
userOrg = 'kotlin'
licenses = ['Apache-2.0']
vcsUrl = 'https://github.com/Kotlin/kotlinx.serialization'
websiteUrl = 'https://github.com/Kotlin/kotlinx.serialization'
issueTrackerUrl = 'https://github.com/Kotlin/kotlinx.serialization/issues'
githubRepo = 'Kotlin/kotlinx.serialization'
version {
name = project.version
}
}
}
}