Skip to content

Conversation

koperagen
Copy link
Collaborator

it wasn't in the jar because java didn't see the file in Kotlin source set; i changed java to point in the same directory because separate source sets for different languages is an outdated and bad practice :)
image

@koperagen koperagen added this to the 1.0.0-Beta3 milestone Sep 10, 2025
@koperagen koperagen self-assigned this Sep 10, 2025
@koperagen koperagen added the bug Something isn't working label Sep 10, 2025

sourceSets {
main {
java.srcDirs("src/main/kotlin")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait, this works? In the past I could've sworn java had something hardcoded somewhere that .java files needed to be in a 'java' folder. For Kotlin this wasn't a constraint, so mixed projects would use the 'java' directory. This is still the case on Android.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On android indeed :) But apparently it does, for example in Kotlin repo they don't even have src/main/kotlin, only src/ for main sources and test/ or testFixtures/ etc for tests, with both java and kotlin files

@Jolanrensen Jolanrensen self-requested a review September 10, 2025 11:42
@Jolanrensen Jolanrensen merged commit 8b80811 into master Sep 10, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants