Skip to content

Commit

Permalink
test: gradle kts fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
lili2311 committed Aug 13, 2020
1 parent ec4aa37 commit 0a8c2dc
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/find-files.test.ts
Expand Up @@ -20,6 +20,7 @@ test('find all files in test fixture', async (t) => {
path.join(testFixture, 'golang', 'golang-app', 'Gopkg.toml'),
path.join(testFixture, 'golang', 'golang-gomodules', 'go.mod'),
path.join(testFixture, 'gradle', 'build.gradle'),
path.join(testFixture, 'gradle-kts', 'build.gradle.kts'),
path.join(testFixture, 'gradle-multiple', 'gradle/build.gradle'),
path.join(testFixture, 'gradle-multiple', 'gradle-another/build.gradle'),
path.join(testFixture, 'maven', 'pom.xml'),
Expand Down Expand Up @@ -53,6 +54,7 @@ test('find all files in test fixture ignoring node_modules', async (t) => {
path.join(testFixture, 'golang', 'golang-gomodules', 'go.mod'),
path.join(testFixture, 'gradle', 'build.gradle'),
path.join(testFixture, 'gradle-multiple', 'gradle/build.gradle'),
path.join(testFixture, 'gradle-multiple', 'gradle/build.gradle'),
path.join(testFixture, 'gradle-multiple', 'gradle-another/build.gradle'),
path.join(testFixture, 'maven', 'pom.xml'),
path.join(testFixture, 'maven', 'test.txt'),
Expand Down
33 changes: 33 additions & 0 deletions test/fixtures/find-files/gradle-kts/build.gradle.kts
@@ -0,0 +1,33 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
val kotlinVersion = "1.3.21"
id("org.jetbrains.kotlin.jvm") version kotlinVersion
id("org.jetbrains.kotlin.plugin.spring") version kotlinVersion
id("org.jetbrains.kotlin.plugin.jpa") version kotlinVersion
}

version = "1.0.0-SNAPSHOT"

tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs = listOf("-Xjsr305=strict")
}
}

tasks.withType<Test> {
useJUnitPlatform()
}

repositories {
mavenCentral()
}

dependencies {
// Removed Spring because too heavy
compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
testCompile("org.jetbrains.kotlin:kotlin-reflect") {
exclude(module = "junit")
}
}
33 changes: 33 additions & 0 deletions test/fixtures/find-files/gradle-kts/subproj/build.gradle.kts
@@ -0,0 +1,33 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
val kotlinVersion = "1.3.21"
id("org.jetbrains.kotlin.jvm") version kotlinVersion
id("org.jetbrains.kotlin.plugin.spring") version kotlinVersion
id("org.jetbrains.kotlin.plugin.jpa") version kotlinVersion
}

version = "1.0.0-SNAPSHOT"

tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs = listOf("-Xjsr305=strict")
}
}

tasks.withType<Test> {
useJUnitPlatform()
}

repositories {
mavenCentral()
}

dependencies {
// Removed Spring because too heavy
compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
testCompile("org.jetbrains.kotlin:kotlin-reflect") {
exclude(module = "junit")
}
}

0 comments on commit 0a8c2dc

Please sign in to comment.