Sha256: c4e74bca4dc69c64a3d4ac1df954ed1e8758c6a6cb73293f8041892cff90be17

Contents?: true

Size: 1.89 KB

Versions: 55

Compression:

Stored size: 1.89 KB

Contents

subprojects {
  afterEvaluate { Project project ->

    configurations {
      starterSourceCompile.extendsFrom compile
      starterSourceRuntime.extendsFrom runtime

      exerciseTestsCompile.extendsFrom testCompile
      exerciseTestsRuntime.extendsFrom testRuntime
    }

    sourceSets {
      // Verify that the tests are working by running them against the example code.
      // By replacing the "main" sourceSet with the example code we avoid any collisions
      //   with solution code that may have been included as a "starter" (e.g. etl).
      main {
        kotlin.srcDirs = ["src/example/kotlin"]
      }
      project["compileKotlin"].doFirst { compileTask ->
        println "  (source = " + compileTask.source.asPath + ")"
      }

      starterSource {
        kotlin.srcDirs = ["src/main/kotlin"]
      }
      project["compileStarterSourceKotlin"].doFirst { compileTask ->
        println "  (source = " + compileTask.source.asPath + ")"
      }

      exerciseTests {
        kotlin {
          srcDirs = ["src/test/kotlin"]
          compileClasspath += main.output
          runtimeClasspath += main.output
        }
      }

      // In lieu of being able to disable @Ignore in JUnit tests, we filter
      // those annotations, placing the edited tests in the path named here.
      test {
        kotlin.srcDirs = ["build/gen/test/kotlin"]
      }
      project["compileTestKotlin"].doFirst { compileTask ->
        println "  (test source = " + compileTask.source.asPath + ")"
      }
    }

    // Note that journey-test.sh also strips @Ignore annotations using sed. The
    // stripping implementations here and in journey-test.sh should be kept
    // consistent.
    task copyTestsFilteringIgnores(type: Copy) {
      from "src/test/kotlin"
      into "build/gen/test/kotlin"
      filter { line -> line.contains("@Ignore") ? "" : line }
    }

    test.dependsOn(copyTestsFilteringIgnores)
  }
}

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
trackler-2.2.1.28 tracks/kotlin/exercises/build.gradle
trackler-2.2.1.27 tracks/kotlin/exercises/build.gradle
trackler-2.2.1.26 tracks/kotlin/exercises/build.gradle
trackler-2.2.1.25 tracks/kotlin/exercises/build.gradle
trackler-2.2.1.24 tracks/kotlin/exercises/build.gradle
trackler-2.2.1.23 tracks/kotlin/exercises/build.gradle
trackler-2.2.1.22 tracks/kotlin/exercises/build.gradle
trackler-2.2.1.21 tracks/kotlin/exercises/build.gradle
trackler-2.2.1.20 tracks/kotlin/exercises/build.gradle
trackler-2.2.1.19 tracks/kotlin/exercises/build.gradle
trackler-2.2.1.18 tracks/kotlin/exercises/build.gradle
trackler-2.2.1.17 tracks/kotlin/exercises/build.gradle
trackler-2.2.1.16 tracks/kotlin/exercises/build.gradle
trackler-2.2.1.15 tracks/kotlin/exercises/build.gradle
trackler-2.2.1.14 tracks/kotlin/exercises/build.gradle
trackler-2.2.1.13 tracks/kotlin/exercises/build.gradle
trackler-2.2.1.12 tracks/kotlin/exercises/build.gradle
trackler-2.2.1.11 tracks/kotlin/exercises/build.gradle
trackler-2.2.1.10 tracks/kotlin/exercises/build.gradle
trackler-2.2.1.9 tracks/kotlin/exercises/build.gradle