Sha256: 20ebb7d9884f563925f1092b702b35ba93072da53a4fbd644fa19ead387b0fb5

Contents?: true

Size: 1.9 KB

Versions: 150

Compression:

Stored size: 1.9 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 reference solution.
      // By replacing the "main" sourceSet with the reference solution we avoid any collisions
      // with solution code that may have been included as a "starter" (e.g. etl).
      main {
        kotlin.srcDirs = [".meta/src/reference/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

150 entries across 150 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/kotlin/exercises/build.gradle
trackler-2.2.1.179 tracks/kotlin/exercises/build.gradle
trackler-2.2.1.178 tracks/kotlin/exercises/build.gradle
trackler-2.2.1.177 tracks/kotlin/exercises/build.gradle
trackler-2.2.1.176 tracks/kotlin/exercises/build.gradle
trackler-2.2.1.175 tracks/kotlin/exercises/build.gradle
trackler-2.2.1.174 tracks/kotlin/exercises/build.gradle
trackler-2.2.1.173 tracks/kotlin/exercises/build.gradle
trackler-2.2.1.172 tracks/kotlin/exercises/build.gradle
trackler-2.2.1.171 tracks/kotlin/exercises/build.gradle
trackler-2.2.1.170 tracks/kotlin/exercises/build.gradle
trackler-2.2.1.169 tracks/kotlin/exercises/build.gradle
trackler-2.2.1.167 tracks/kotlin/exercises/build.gradle
trackler-2.2.1.166 tracks/kotlin/exercises/build.gradle
trackler-2.2.1.165 tracks/kotlin/exercises/build.gradle
trackler-2.2.1.164 tracks/kotlin/exercises/build.gradle
trackler-2.2.1.163 tracks/kotlin/exercises/build.gradle
trackler-2.2.1.162 tracks/kotlin/exercises/build.gradle
trackler-2.2.1.161 tracks/kotlin/exercises/build.gradle
trackler-2.2.1.160 tracks/kotlin/exercises/build.gradle