arrow-kt / ank

ΛNK: Compile time docs verification and evaluation for Kotlin and Java (Temporarily moved to Arrow-kt)
https://github.com/arrow-kt/arrow/tree/master/modules/ank
Apache License 2.0
53 stars 3 forks source link

Ank Gradle plugin #7

Closed Guardiola31337 closed 6 years ago

Guardiola31337 commented 6 years ago

Usage:

Root build.gradle

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath group: 'io.kategory', name: 'ank-gradle-plugin', version: '0.1.2'
    }
}

repositories {
        maven { url "http://dl.bintray.com/kategory/maven" }
}

The latter ☝️ won't be necessary when getting ank-core included in JCenter.

Sample build.gradle

apply plugin: 'ank-gradle-plugin'

ank {
    classpath = sourceSets.main.runtimeClasspath
    arguments = ["${projectDir}/src/main/docs",
                 "${projectDir}/src/main/site",
                 "-classpath", "${sourceSets.main.runtimeClasspath.join(":")}"]
}

👀 @raulraja

Guardiola31337 commented 6 years ago

At the moment you need to add the following too:

repositories {
        maven { url "https://dl.bintray.com/jetbrains/markdown/" }
        maven { url 'https://jitpack.io' }
}

Those dependencies are needed by ank-core. We should find a way to remove them. Maybe same way as ank-core in ank-gradle-plugin could work. I'll 👀