ralf
01/09/2017, 1:57 PM:lib and :app. app depends on lib. Both modules contain Java and Kotlin code. Additionally, the lib module includes a gradle script to upload the library to a maven repository.
So far so good. The problem is the publishing script. It starts with
apply plugin: 'maven-publish'
group = ‘com.group'
version = VERSION_NAME // defined in gradle.properties
…
This for some reason results in an error and the compiler can’t find the Kotlin classes from the lib module in my app anymore. If I change the version to version = ‘2.2’, then everything works. But somehow references like version = rootProject.ext.version break the build.
Does anyone know why this is happening? Only Kotlin classes are affected. I also checked that they bundled in the .aar file and they are.