Permissionsdispatcher: Generated class in Kotlin

Created on 8 Nov 2016  路  3Comments  路  Source: permissions-dispatcher/PermissionsDispatcher

My MainActivityPermissionsDispatcher is treated as unresolved reference upon a first build, so I've worked out next steps:

  1. Add main.java.srcDirs += 'build/generated/source/kapt/debug' to build.gradle(in 'app' module).
  2. Comment any code related to a generated class, and un-comment it after a success build.

This is not seems right, especially when working in a team, and, IMHO, it is an issue. Please, correct me, if I am using the library in a wrong way.

P.S. I am using kapt for annotation processing, here is an import string:
gradle kapt group: 'com.github.hotchemi', name: 'permissionsdispatcher-processor', version: '2.2.0'

inquiry

Most helpful comment

FYI: Kolin has two kapt, generating stub and native implementation(from 1.0.4), have you tried both?

Exactly, I forgot about stubs. This simple instruction just saved a day, thanks:

kapt {
    generateStubs = true
}

Totally my bad, the issue can be closed, and thanks again.

All 3 comments

Could you post build.gradle? Could you give us simple project that reproduce this issue?

@C4Grey Firstable you don't have to add build to source dirs. I know some uses that are using this library with Kotlin well so I suppose you might mistake or miss something. Could you give us a minimum example?
FYI: Kolin has two kapt, generating stub and native implementation(from 1.0.4), have you tried both?

FYI: Kolin has two kapt, generating stub and native implementation(from 1.0.4), have you tried both?

Exactly, I forgot about stubs. This simple instruction just saved a day, thanks:

kapt {
    generateStubs = true
}

Totally my bad, the issue can be closed, and thanks again.

Was this page helpful?
0 / 5 - 0 ratings