V
V
Vyacheslav Kuznetsov2019-08-30 12:04:48
SQLite
Vyacheslav Kuznetsov, 2019-08-30 12:04:48

How to include SqlDelight driver in Multiplatform Kotlin Library?

Good afternoon, I want to write a simple ORM in Kotlin Native. I create a project in the Multiplatform Library studio. Found the SqlDelight driver. I'm trying to install it according to the documentation. But nothing comes out.
Here is my gradle.wrapers:

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

build.gradle:
plugins {
    id 'org.jetbrains.kotlin.multiplatform' version '1.3.41'
}

repositories {
    google()
    mavenCentral()
}

group 'com.example.test'
version '0.0.1'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'maven-publish'
apply plugin: 'com.squareup.sqldelight'

archivesBaseName = 'store-item'

configurations {
    compileClasspath
}
kotlin {
    jvm()

    sourceSets {
        commonMain {
            dependencies {
                implementation kotlin('stdlib-common')
            }
        }
        commonTest {
            dependencies {
                implementation kotlin('test-common')
                implementation kotlin('test-annotations-common')
            }
        }
        jvmMain {
            dependencies {
                implementation kotlin('stdlib-jdk8')
                implementation "com.squareup.sqldelight:sqlite-driver:1.1.4"
            }

        }
        jvmTest {
            dependencies {
                implementation kotlin('test')
                implementation kotlin('test-junit')
            }
        }
    }
}

Gradle complains: Plugin with id 'com.squareup.sqldelight' not found.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question