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

Gradle Issue for Kotlin dependencies #897

Open
danrix89 opened this issue Sep 11, 2019 · 1 comment
Open

Gradle Issue for Kotlin dependencies #897

danrix89 opened this issue Sep 11, 2019 · 1 comment

Comments

@danrix89
Copy link

danrix89 commented Sep 11, 2019

I'm trying to use requery in a Kotlin back-end application. I'm currently struggling to setup my Gradle so I can use KotlinConfiguration and KotlinEntityDataStore.

This is what my build.gradle dependencies looks like:

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
    testCompile group: 'junit', name: 'junit', version: '4.12'
    compile 'io.requery:requery:1.6.1'
    compile 'io.requery:requery-kotlin:1.6.0'
    kapt 'io.requery:requery-processor:1.5.1'
}

Here's what my main application Kotlin file looks like:

// Where is the kotlin requery packages located???
import io.requery.requery-kotlin?

fun main(args : Array<String>) {

    // Both KotlinConfiguration and KotlinEntityDataStore are unknown. I need to know which package to import
    val configuration = KotlinConfiguration(dataSource = dataSource, model = Models.DEFAULT)
    val data = KotlinEntityDataStore(configuration)
}

Also where does dataSource and Models.DEFAULT come from?

The documentation is very unclear in its examples. It'd be great if the examples showed a full Kotlin gradle file and an example application Kotlin file.

Any help anyone can give me would be greatly appreciated! :)

@zwieback
Copy link

zwieback commented Dec 2, 2019

Hi there!

Where is the kotlin requery packages located???

Try to find there.

Also where does Models.DEFAULT come from?

It is generated by the io.requery.processor.EntityProcessor.

compile 'io.requery:requery:1.6.1'
compile 'io.requery:requery-kotlin:1.6.0'
kapt 'io.requery:requery-processor:1.5.1'

It is also best to use the same version for all requery dependencies.


If I could help, then you can close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants