You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

103 lines
2.4 KiB

import com.gradle.publish.DependenciesBuilder
import org.jetbrains.CorrectShadowPublishing
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: "com.gradle.plugin-publish"
sourceCompatibility = 1.8
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
freeCompilerArgs += "-Xjsr305=strict"
languageVersion = "1.2"
apiVersion = "1.1"
jvmTarget = "1.8"
}
}
repositories {
jcenter()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
shadow project(path: ':runners:gradle-plugin', configuration: 'shadow')
compileOnly project(':integration')
compileOnly gradleApi()
compileOnly localGroovy()
}
task sourceJar(type: Jar) {
from sourceSets.main.allSource
}
processResources {
inputs.property("dokka_version", dokka_version)
eachFile {
if (it.name == "org.jetbrains.dokka-android.properties") {
it.filter { line ->
line.replace("<version>", dokka_version)
}
}
}
}
shadowJar {
baseName = 'dokka-android-gradle-plugin'
classifier = ''
}
apply plugin: 'maven-publish'
publishing {
publications {
dokkaAndroidGradlePlugin(MavenPublication) { MavenPublication publication ->
artifactId = 'dokka-android-gradle-plugin'
artifact sourceJar {
classifier "sources"
}
CorrectShadowPublishing.configure(publication, project)
}
}
}
bintrayPublication(project, ['dokkaAndroidGradlePlugin'])
configurations.archives.artifacts.clear()
artifacts {
archives shadowJar
}
pluginBundle {
website = 'http://www.kotlinlang.org/'
vcsUrl = 'https://github.com/kotlin/dokka.git'
description = 'Dokka, the Kotlin documentation tool'
tags = ['dokka', 'kotlin', 'kdoc', 'android']
plugins {
dokkaAndroidGradlePlugin {
id = 'org.jetbrains.dokka-android'
displayName = 'Dokka Android plugin'
}
}
withDependencies { List<Dependency> list ->
list.clear()
def builder = new DependenciesBuilder()
builder.addUniqueScopedDependencies(list, configurations.shadow, "compile")
}
mavenCoordinates {
groupId = "org.jetbrains.dokka"
artifactId = "dokka-android-gradle-plugin"
}
}