every time i have reference to MyObjectBox or Entiry_ class build fails

556 views Asked by At

im trying to migrate to objectbox iv build an example iv configured gradle with all needed project gradle:

buildscript {
    ext.object_box_version = '1.0.1'
    repositories {
        maven { url "http://objectbox.net/beta-repo/" }
    }

    dependencies {
        classpath "io.objectbox:objectbox-gradle-plugin:$object_box_version"
    }

    allprojects {
        repositories {
            maven { url "http://objectbox.net/beta-repo/" }
        }
    }
}

app gradle:

apply plugin: 'io.objectbox'

dependencies {
    implementation "io.objectbox:objectbox-android:$object_box_version"
    implementation "io.objectbox:objectbox-kotlin:$object_box_version"
    kapt "io.objectbox:objectbox-processor:$object_box_version"
}

User class:

@Entity
class User(
        @Id
        var id: Long = 0,
        var name: String = ""
)

than when i create my App class to build BoxStore i find MyObjectBox but after i have references of it in my code and i hit rebuild i get error cant find MyObjectBox ( or any other ObjectBox generated class like Entity_ .. )

1

There are 1 answers

0
CodePLeX On

all i was missing was

apply plugin: 'kotlin-kapt'