Fix Kotlin internal files created in 'build/' ignoring custom buildDir
Issue #KT-10537 Fixed
This commit is contained in:
+1
-2
@@ -184,8 +184,6 @@ class SimpleKotlinGradleIT : BaseGradleIT() {
|
|||||||
val project = Project("kotlinProject", GRADLE_VERSION)
|
val project = Project("kotlinProject", GRADLE_VERSION)
|
||||||
project.setupWorkingDir()
|
project.setupWorkingDir()
|
||||||
|
|
||||||
File(project.projectDir, "build").writeText("This file prevents Gradle from using 'build' as a directory")
|
|
||||||
|
|
||||||
// Change the build directory in the end of the build script:
|
// Change the build directory in the end of the build script:
|
||||||
val customBuildDirName = "customBuild"
|
val customBuildDirName = "customBuild"
|
||||||
File(project.projectDir, "build.gradle").modify {
|
File(project.projectDir, "build.gradle").modify {
|
||||||
@@ -195,6 +193,7 @@ class SimpleKotlinGradleIT : BaseGradleIT() {
|
|||||||
project.build("build") {
|
project.build("build") {
|
||||||
assertSuccessful()
|
assertSuccessful()
|
||||||
assertFileExists("$customBuildDirName/classes")
|
assertFileExists("$customBuildDirName/classes")
|
||||||
|
assertNoSuchFile("build")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+1
-1
@@ -262,7 +262,7 @@ open class KotlinCompile : AbstractKotlinCompile<K2JVMCompilerArguments>(), Kotl
|
|||||||
private var kaptAnnotationsFileUpdater: AnnotationFileUpdater? = null
|
private var kaptAnnotationsFileUpdater: AnnotationFileUpdater? = null
|
||||||
|
|
||||||
@get:Internal
|
@get:Internal
|
||||||
val buildHistoryFile: File = File(taskBuildDirectory, "build-history.bin")
|
val buildHistoryFile: File get() = File(taskBuildDirectory, "build-history.bin")
|
||||||
|
|
||||||
@get:Internal
|
@get:Internal
|
||||||
val kaptOptions = KaptOptions()
|
val kaptOptions = KaptOptions()
|
||||||
|
|||||||
Reference in New Issue
Block a user