Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

renaming dirs from 'java' to 'kotlin' #5

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
3 participants
@pwittchen
Copy link

commented May 9, 2019

In this PR, I'm renaming dirs:

  • from: app/src/main/java to app/src/main/kotlin
  • from: app/src/test/java to app/src/test/kotlin
@piotrek1543
Copy link

left a comment

Looks good to me ;-)

@owahltinez

This comment has been minimized.

Copy link
Collaborator

commented May 14, 2019

Thanks for the PR @pwittchen but I'm not sure that this would work without also making some changes to the Gradle files -- specially for older versions of Android Studio. Since this is the default project structure in Android Studio, even for new Kotlin applications, we will probably stick to the current paths.

@piotrek1543

This comment has been minimized.

Copy link

commented May 16, 2019

@owahltinez I had an issue with compiling project in AS 3.2 when trying to do same as in this merge request and I found the solution to declare manually paths in gradle files.

@pwittchen

This comment has been minimized.

Copy link
Author

commented May 18, 2019

@owahltinez you're right. I've updated gradle configuration within my PR. I also bumped version of androidx.core:core-ktx. Moreover, I rebuild project in Android Studio to verify that it works and checked if directories are marked properly in the IDE.

Zrzut ekranu z 2019-05-18 10-52-42
Zrzut ekranu z 2019-05-18 11-00-42

@owahltinez

This comment has been minimized.

Copy link
Collaborator

commented May 21, 2019

@pwittchen what is the reason behind renaming directories? As far as I understand it, it's not the convention. Android Studio uses java as the default directory name and all other Android samples I'm aware of, whether they are written in Kotlin or not, use the default directory name.

I think that renaming the directories may be confusing to other developers in addition to adding complexity to Gradle files for the sake of stylistic choices. Your PR also breaks the current tests setup that allows for sharing tests between roboelectric and adb devices.

@pwittchen

This comment has been minimized.

Copy link
Author

commented May 21, 2019

Ok, I thought that's the standard and proper convention of naming directories in projects written in Kotlin. E.g. JetBrains sample here: https://github.com/JetBrains/kotlin-examples/tree/master/gradle/hello-world has such naming convention. If that's not the standard or correct way of naming, we can close this PR.

@pwittchen pwittchen closed this May 24, 2019

@pwittchen pwittchen deleted the pwittchen:renaming-dirs branch May 24, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.