aboutsummaryrefslogtreecommitdiff
path: root/runners/android-gradle-plugin
diff options
context:
space:
mode:
Diffstat (limited to 'runners/android-gradle-plugin')
-rw-r--r--runners/android-gradle-plugin/build.gradle101
-rw-r--r--runners/android-gradle-plugin/src/main/kotlin/mainAndroid.kt40
-rw-r--r--runners/android-gradle-plugin/src/main/resources/META-INF/gradle-plugins/org.jetbrains.dokka-android.properties2
3 files changed, 0 insertions, 143 deletions
diff --git a/runners/android-gradle-plugin/build.gradle b/runners/android-gradle-plugin/build.gradle
deleted file mode 100644
index 28b0cbb9..00000000
--- a/runners/android-gradle-plugin/build.gradle
+++ /dev/null
@@ -1,101 +0,0 @@
-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 {
- 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 = 'https://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"
- }
-} \ No newline at end of file
diff --git a/runners/android-gradle-plugin/src/main/kotlin/mainAndroid.kt b/runners/android-gradle-plugin/src/main/kotlin/mainAndroid.kt
deleted file mode 100644
index b1996da0..00000000
--- a/runners/android-gradle-plugin/src/main/kotlin/mainAndroid.kt
+++ /dev/null
@@ -1,40 +0,0 @@
-package org.jetbrains.dokka.gradle
-
-import org.gradle.api.Plugin
-import org.gradle.api.Project
-import org.gradle.api.tasks.Input
-import org.jetbrains.dokka.DokkaConfiguration.ExternalDocumentationLink.Builder
-import java.io.File
-
-open class DokkaAndroidPlugin : Plugin<Project> {
- override fun apply(project: Project) {
- DokkaVersion.loadFrom(javaClass.getResourceAsStream("/META-INF/gradle-plugins/org.jetbrains.dokka-android.properties"))
- project.tasks.create("dokka", DokkaAndroidTask::class.java).apply {
- dokkaRuntime = project.configurations.create("dokkaRuntime")
- moduleName = project.name
- outputDirectory = File(project.buildDir, "dokka").absolutePath
- }
- }
-}
-
-private val ANDROID_REFERENCE_URL = Builder("https://developer.android.com/reference/").build()
-
-open class DokkaAndroidTask : DokkaTask() {
-
- @Input var noAndroidSdkLink: Boolean = false
-
- override fun collectSuppressedFiles(sourceRoots: List<SourceRoot>): List<String> {
- val generatedRoot = project.buildDir.resolve("generated").absoluteFile
- return sourceRoots
- .map { File(it.path) }
- .filter { it.startsWith(generatedRoot) }
- .flatMap { it.walk().toList() }
- .map { it.absolutePath }
- }
-
- init {
- project.afterEvaluate {
- if (!noAndroidSdkLink) externalDocumentationLinks.add(ANDROID_REFERENCE_URL)
- }
- }
-}
diff --git a/runners/android-gradle-plugin/src/main/resources/META-INF/gradle-plugins/org.jetbrains.dokka-android.properties b/runners/android-gradle-plugin/src/main/resources/META-INF/gradle-plugins/org.jetbrains.dokka-android.properties
deleted file mode 100644
index b204da7b..00000000
--- a/runners/android-gradle-plugin/src/main/resources/META-INF/gradle-plugins/org.jetbrains.dokka-android.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-implementation-class=org.jetbrains.dokka.gradle.DokkaAndroidPlugin
-dokka-version=<version> \ No newline at end of file