capitalthree
06/24/2019, 9:27 PMBenjamin Charais
06/24/2019, 9:29 PM// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.3.31'
ext.coroutines_version = '1.2.1'
ext.klockVersion = "1.4.0"
// Reduced these values to get serialization to work
ext.serialization_version = "0.10.0"
ext.ktor_version = '1.1.4'
ext.dokka_version = '0.9.17'
repositories {
google()
jcenter()
mavenCentral()
maven { url "<https://kotlin.bintray.com/kotlinx>" }
maven { url "<https://kotlin.bintray.com/ktor>" }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
classpath "org.jetbrains.dokka:dokka-android-gradle-plugin:$dokka_version"
classpath 'com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta04'
classpath "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-test-common:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-test-annotations-common:$kotlin_version"
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven { url "<https://kotlin.bintray.com/kotlinx>" }
maven { url "<https://kotlin.bintray.com/ktor>" }
}
}
capitalthree
06/24/2019, 9:33 PMBenjamin Charais
06/24/2019, 9:35 PMcapitalthree
06/24/2019, 9:41 PMBenjamin Charais
06/24/2019, 9:57 PMcapitalthree
06/24/2019, 9:58 PMBenjamin Charais
06/24/2019, 10:06 PMKotlin's Java interop works due to the fact that Kotlin incorporates a parser for Java source code, which allows to reference declarations which haven't been compiled yet. Kotlin doesn't incorporate a Scala parser, so it can only invoke Scala code which has been compiled; the reverse is also true. Thus I don't think that full three-way interop could be possible without a lot of extra work.
capitalthree
06/24/2019, 10:07 PMBenjamin Charais
06/24/2019, 10:09 PMcapitalthree
06/24/2019, 10:09 PMplugins {
id 'scala'
}
dependencies {
compile 'org.scala-lang:scala-library:2.11.12'
}
repositories {
jcenter()
}
Benjamin Charais
06/24/2019, 10:14 PMcapitalthree
06/24/2019, 10:16 PMBenjamin Charais
06/24/2019, 10:17 PMinclude ':android', 'SharedCode', ':iosApp'
This would create 3 modules in intellij.
Then in order to create a subproject, it just requires another build.gradle
inside the module itself.
Boom subproject!!
referencing output can be done with sourceSets and outputDircapitalthree
06/24/2019, 10:19 PMBenjamin Charais
06/24/2019, 10:19 PMcapitalthree
06/24/2019, 10:20 PMBenjamin Charais
06/24/2019, 10:20 PMSharedCode
is being treated as a library.capitalthree
06/24/2019, 10:21 PMinclude("websystem", ":dbsystem")
?Benjamin Charais
06/24/2019, 10:21 PMcapitalthree
06/24/2019, 10:22 PMimplementation(project("dbsystem"))
, is that right? do I want a colon there too?Benjamin Charais
06/24/2019, 10:26 PMcapitalthree
06/24/2019, 10:27 PMBenjamin Charais
06/24/2019, 10:29 PMapi
not implementation
and it would still receive a coloncapitalthree
06/24/2019, 10:30 PMBenjamin Charais
06/24/2019, 10:30 PMcapitalthree
06/24/2019, 10:33 PMUnable to find a matching configuration of project :dbsystem: None of the consumable configurations have attributes.
rootProject.name = "dbsystem"
Benjamin Charais
06/25/2019, 12:32 AM