Konstantin Tskhovrebov

    Konstantin Tskhovrebov

    3 years ago
    How can I add source directory with generated proto classes for js target in my multiplatform project? For java it looks like:
    kotlin
    
    apply plugin: "kotlin-multiplatform"
    apply plugin: "java"
    apply plugin: "com.google.protobuf"
    
    kotlin {
        targets {
            fromPreset(presets.jvmWithJava, "jvm")
        }
    //....
    }
    
    java {
        sourceSets {
            main {
                java.srcDirs += "build/generated/source/proto/main/javalite"
                proto.srcDirs += "src/proto"
            }
        }
    }
    Dominaezzz

    Dominaezzz

    3 years ago
    You want to consume java source code in your multiplatform project?
    Konstantin Tskhovrebov

    Konstantin Tskhovrebov

    3 years ago
    Yes but only for JVM target. And it works 🙂
    Dominaezzz

    Dominaezzz

    3 years ago