blob: b9a4d1155202322572df4e169e0d34eba838bd5b [file] [log] [blame]
Dan Albertdca0d722019-07-16 14:03:43 -07001import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2
3plugins {
4 kotlin("jvm") version "1.3.50"
5 application
6}
7
8group = "com.android"
9version = "1.0.0-SNAPSHOT"
10
11repositories {
12 mavenCentral()
13 jcenter()
14 google()
15 maven(url = "https://dl.bintray.com/s1m0nw1/KtsRunner")
16}
17
18dependencies {
19 implementation(kotlin("stdlib", "1.3.50"))
20 implementation(kotlin("reflect", "1.3.50"))
21
22 implementation("com.google.prefab:api:1.0.0-alpha2")
23
24 implementation("com.github.ajalt:clikt:2.2.0")
25 implementation("com.squareup.okhttp3:okhttp:4.2.2")
26 implementation("de.swirtz:ktsRunner:0.0.7")
27 implementation("org.apache.maven:maven-core:3.6.2")
28 implementation("org.redundent:kotlin-xml-builder:1.5.3")
29
30 testImplementation("org.jetbrains.kotlin:kotlin-test")
31 testImplementation("org.jetbrains.kotlin:kotlin-test-junit")
32 testImplementation("org.junit.jupiter:junit-jupiter-api:5.6.0-M1")
33 testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.6.0-M1")
34}
35
36application {
37 // Define the main class for the application.
38 mainClassName = "com.android.ndkports.CliKt"
39}
40
41tasks.withType<KotlinCompile> {
42 kotlinOptions.jvmTarget = "1.8"
43 kotlinOptions.freeCompilerArgs += listOf(
44 "-progressive",
45 "-Xuse-experimental=kotlinx.serialization.ImplicitReflectionSerializer"
46 )
47}
48
49// Can be specified in ~/.gradle/gradle.properties:
50//
51// ndkPath=/path/to/ndk
52//
53// Or on the command line:
54//
55// ./gradlew -PndkPath=/path/to/ndk run
56val ndkPath: String by project
57tasks.named<JavaExec>("run") {
58 val allPorts = File("ports").listFiles()!!.map { it.name }
59 args = listOf("--ndk", ndkPath, "-o", "out") + allPorts
60}