Skip to content

Commit

Permalink
Add all sources to the transformed directory (#394)
Browse files Browse the repository at this point in the history
* Add all sources to the transformed directories.

Fixes #388

Co-authored-by: Yahor Berdnikau <yahor.berdnikau@jetbrains.com>
  • Loading branch information
mvicsokolova and Tapchicoma authored Jan 22, 2024
1 parent 2ab3902 commit e3cb148
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,9 @@ private fun Project.configureTransformationForTarget(target: KotlinTarget) {
it.destinationDirectory.value(originalDestinationDirectory)
}
}
val originalClassesDirs: FileCollection =
project.files(classesDirs.from.toTypedArray()).filter { it.exists() }
val originalClassesDirs: FileCollection = project.objects.fileCollection()
.from(compilationTask.flatMap { it.destinationDirectory })
.from({ project.files(classesDirs.from).filter { it.exists() } })
originalDirsByCompilation[compilation] = originalClassesDirs
val transformedClassesDir = project.layout.buildDirectory
.dir("classes/atomicfu/${target.name}/${compilation.name}")
Expand Down
5 changes: 5 additions & 0 deletions integration-testing/examples/jvm-sample/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ group = "kotlinx.atomicfu.examples"
version = "DUMMY_VERSION"

plugins {
application
kotlin("jvm") version libs.versions.kotlinVersion.get()
`maven-publish`
}
Expand All @@ -37,6 +38,10 @@ tasks.compileKotlin {
}
}

application {
mainClass.set("org.example.MainKt")
}

publishing {
repositories {
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
package org.example;

import java.util.concurrent.atomic.AtomicLongFieldUpdater;

public class JavaClass {
Expand Down

0 comments on commit e3cb148

Please sign in to comment.