xref: /aosp_15_r20/external/dokka/runners/gradle-integration-tests/build.gradle (revision 1b2d298c530bf0473cc943e8414a5ff577a994bc)
1*1b2d298cSOwner Cleanup Bot
2*1b2d298cSOwner Cleanup Bot
3*1b2d298cSOwner Cleanup Botapply plugin: 'kotlin'
4*1b2d298cSOwner Cleanup Bot
5*1b2d298cSOwner Cleanup BotsourceCompatibility = 1.8
6*1b2d298cSOwner Cleanup Bot
7*1b2d298cSOwner Cleanup Bottasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
8*1b2d298cSOwner Cleanup Bot    kotlinOptions {
9*1b2d298cSOwner Cleanup Bot        freeCompilerArgs += "-Xjsr305=strict"
10*1b2d298cSOwner Cleanup Bot        languageVersion = "1.2"
11*1b2d298cSOwner Cleanup Bot        apiVersion = "1.0"
12*1b2d298cSOwner Cleanup Bot        jvmTarget = "1.8"
13*1b2d298cSOwner Cleanup Bot    }
14*1b2d298cSOwner Cleanup Bot}
15*1b2d298cSOwner Cleanup Bot
16*1b2d298cSOwner Cleanup Botconfigurations {
17*1b2d298cSOwner Cleanup Bot    dokkaPlugin
18*1b2d298cSOwner Cleanup Bot    dokkaAndroidPlugin
19*1b2d298cSOwner Cleanup Bot    dokkaFatJar
20*1b2d298cSOwner Cleanup Bot}
21*1b2d298cSOwner Cleanup Bot
22*1b2d298cSOwner Cleanup Botdependencies {
23*1b2d298cSOwner Cleanup Bot
24*1b2d298cSOwner Cleanup Bot    testCompileOnly group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib', version: kotlin_for_gradle_runtime_version
25*1b2d298cSOwner Cleanup Bot    testCompile group: 'org.jetbrains.kotlin', name: 'kotlin-test-junit', version: kotlin_for_gradle_runtime_version
26*1b2d298cSOwner Cleanup Bot    testCompile ideaRT()
27*1b2d298cSOwner Cleanup Bot
28*1b2d298cSOwner Cleanup Bot    dokkaPlugin project(path: ':runners:gradle-plugin', configuration: 'shadow')
29*1b2d298cSOwner Cleanup Bot    dokkaAndroidPlugin project(path: ':runners:android-gradle-plugin', configuration: 'shadow')
30*1b2d298cSOwner Cleanup Bot    dokkaFatJar project(path: ":runners:fatjar", configuration: 'shadow')
31*1b2d298cSOwner Cleanup Bot
32*1b2d298cSOwner Cleanup Bot    testCompile group: 'junit', name: 'junit', version: '4.12'
33*1b2d298cSOwner Cleanup Bot    testCompile gradleTestKit()
34*1b2d298cSOwner Cleanup Bot}
35*1b2d298cSOwner Cleanup Bot
36*1b2d298cSOwner Cleanup Bot
37*1b2d298cSOwner Cleanup Bot
38*1b2d298cSOwner Cleanup Bottask createClasspathManifest {
39*1b2d298cSOwner Cleanup Bot    def outputDir = file("$buildDir/$name")
40*1b2d298cSOwner Cleanup Bot
41*1b2d298cSOwner Cleanup Bot    inputs.files(configurations.dokkaPlugin + configurations.dokkaAndroidPlugin + configurations.dokkaFatJar)
42*1b2d298cSOwner Cleanup Bot    outputs.dir outputDir
43*1b2d298cSOwner Cleanup Bot
44*1b2d298cSOwner Cleanup Bot    doLast {
45*1b2d298cSOwner Cleanup Bot        outputDir.mkdirs()
46*1b2d298cSOwner Cleanup Bot        file("$outputDir/dokka-plugin-classpath.txt").text = configurations.dokkaPlugin.join("\n")
47*1b2d298cSOwner Cleanup Bot        file("$outputDir/android-dokka-plugin-classpath.txt").text = configurations.dokkaAndroidPlugin.join("\n")
48*1b2d298cSOwner Cleanup Bot        file("$outputDir/fatjar.txt").text = configurations.dokkaFatJar.join("\n")
49*1b2d298cSOwner Cleanup Bot    }
50*1b2d298cSOwner Cleanup Bot}
51*1b2d298cSOwner Cleanup Bot
52*1b2d298cSOwner Cleanup Bot
53*1b2d298cSOwner Cleanup BotcreateClasspathManifest.mustRunAfter project(":runners:fatjar").shadowJar
54*1b2d298cSOwner Cleanup BottestClasses.dependsOn project(":runners:fatjar").shadowJar
55*1b2d298cSOwner Cleanup BottestClasses.dependsOn createClasspathManifest
56*1b2d298cSOwner Cleanup Bot
57*1b2d298cSOwner Cleanup Bottest {
58*1b2d298cSOwner Cleanup Bot    systemProperty "android.licenses.overwrite", project.findProperty("android.licenses.overwrite") ?: ""
59*1b2d298cSOwner Cleanup Bot}