java - kotlin project can't be build in gradle -


i have java project write in kotlin ,i use intellij idea develop project. have trouble on dependencies setting (multiple project). read lot of examples , can't find workaround , here dependencies setting code, can build in java class correctly , kotlin class lot of error 'unresolved reference' . wrong setting or gradle not suitable kotlin .

ps : when build core project , build process successful , build @ test project reference unresolved error

allprojects { apply plugin: 'java' apply plugin: 'kotlin' group 'testproject' version '1.0' }    subprojects{ apply plugin:  'java' apply plugin: 'kotlin' def defaultencoding = 'utf-8' compilejava.options.encoding = defaultencoding sourcecompatibility = 1.8 targetcompatibility = 1.8  repositories {     mavencentral()     mavenlocal() }  dependencies {      // kotlin     compile "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"     compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"     compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" } } project(':test') { dependencies {     compile project(':core')     compile project(':testtwo') }  project(':testtwo'){ dependencies{     compile project(':core') } 

setting.gradle

include 'test','testtwo','core' 

the kotlin-gradle-plugin not dependency of subprojects, dependency of buildscript itself.

follow instructions on plugin , versions


Comments

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -