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

please check sourceset #1195

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,9 @@ android {

// Set each custom apps respective source directory
sourceSets {
main {
java.srcDirs = ['src/main/java', 'build/generated/source/kapt/kiwixRelease']
Copy link
Contributor

Choose a reason for hiding this comment

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

This is when you try to build a custom app? Hardcoding the variant is definitely not a good idea, it is possible that you could build it but just need a file refresh? Can you switch to my branch, file>invalidate caches and restart, build and then run?

Copy link
Contributor Author

@soloturn soloturn Jun 16, 2019

Choose a reason for hiding this comment

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

the goal was to find a minimal commit to convert an android java application, here the branch "develop", so that it can accomodate a kotlin application file. to learn, i looked at branch macgills/2.5-kotlin and its commits. as test i converted app/KiwixApplication.java with AndroidStudio to app/KiwixApplication.kt. the reasoning was that starting from the top of the logic would need the least adjustments in other files. the try is in soloturn/kotlin now, not compiling.

taking your 2.5-kotlin as base, i tried now again and pushed soloturn/2.5-kotlin. for me it does not build with

/srv/http/kiwix-android/app/src/main/java/org/kiwix/kiwixmobile/database/BookDao.java:44: error: cannot find symbol
  public void setBookDetails(Book book, SquidCursor<BookDatabaseEntity> bookCursor) {
                                                    ^
  symbol:   class BookDatabaseEntity
  location: class BookDao

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@macgills could you do me a favour and once try if convert KiwixApplication to kotlin compiles for you, and if not what you would change in the build.gradle?

}
map.each { name, directory ->
"$name" {
setRoot directory
Expand Down