Skip to content

Instantly share code, notes, and snippets.

@rahulsom
Created January 29, 2018 05:08
Show Gist options
  • Select an option

  • Save rahulsom/6dc5c9bd934993b617b051498fb55a18 to your computer and use it in GitHub Desktop.

Select an option

Save rahulsom/6dc5c9bd934993b617b051498fb55a18 to your computer and use it in GitHub Desktop.

Revisions

  1. rahulsom created this gist Jan 29, 2018.
    62 changes: 62 additions & 0 deletions demo.adoc
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,62 @@
    = Demo
    :junitPlatformVersion: 1.2.3

    This works, but is not ideal

    [source,kotlin,subs="attributes"]
    .build.gradle.kts
    ----
    buildscript {
    dependencies {
    classpath("org.junit.platform:junit-platform-gradle-plugin:{junitPlatformVersion}")
    }
    }
    configure<JUnitPlatformExtension> {
    filters {
    engines {
    include("spek")
    }
    }
    }
    ----

    This also works, but disallows use of attributes

    [source,kotlin]
    .build.gradle.kts
    ----
    buildscript {
    dependencies {
    classpath("org.junit.platform:junit-platform-gradle-plugin:1.2.3")
    }
    }
    configure<JUnitPlatformExtension> {
    filters {
    engines {
    include("spek")
    }
    }
    }
    ----

    This is what one would like to do, but doesn't work

    [source,kotlin,subs="attributes"]
    .build.gradle.kts
    ----
    buildscript {
    dependencies {
    classpath("org.junit.platform:junit-platform-gradle-plugin:{junitPlatformVersion}")
    }
    }
    configure<JUnitPlatformExtension> {
    filters {
    engines {
    include("spek")
    }
    }
    }
    ----