Sekret icon indicating copy to clipboard operation
Sekret copied to clipboard

Unable to install plugin

Open lmiskovic opened this issue 11 months ago • 3 comments

Hey there, not sure if I'm missing some steps, but I'm unable to install the plugin from mavenCentral() Procjet is made with KMP supporting android and iOS targets and I'm trying to add the plugin to shared code module.

This is the plugins block in shared module

plugins {
    alias(libs.plugins.kotlinMultiplatform)
    alias(libs.plugins.androidLibrary)
    alias(libs.plugins.nativecoroutines)
    alias(libs.plugins.serialization)
    alias(libs.plugins.sekret)
}

This is settings.gradle.kts

enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
pluginManagement {
    repositories {
        google()
        gradlePluginPortal()
        mavenCentral()
    }
}

dependencyResolutionManagement {
    repositories {
        google()
        mavenCentral()
    }
}

rootProject.name = "Sample"
include(":androidApp")
include(":shared")

libs.versions.toml

[versions]
....
sekret = "1.0.1"

[plugins]
....
sekret = { id = "dev.datlag.sekret", version.ref = "sekret" }

I'm getting following error when building. I have not yet get to the configuration part as I'm unable to build

An exception occurred applying plugin request [id: 'dev.datlag.sekret', version: '1.0.1'] Failed to apply plugin 'dev.datlag.sekret'. A dependency must not be empty

Any pointing in the right direction would ne appreciated

lmiskovic avatar Mar 29 '24 07:03 lmiskovic

Please upgrade to version https://github.com/DatL4g/Sekret/releases/tag/v2.0.0-alpha-01

The required feature is stable in that release. And run a ./gradlew clean before syncing.

Please keep in mind that there is currently no shared class and you have to work with expect/actual methods then.

On Android: Sekret.myValue(key) On iOS: myValue(key)

DatL4g avatar Mar 29 '24 10:03 DatL4g

@DatL4g Not working at all. I am using 2.0.0-alpha-04 and getting Unresolved reference: Sekret

Monabr avatar May 05 '24 14:05 Monabr

@Monabr of course it is.

Make sure to generate the module sources: ./gradlew generateSekret and to add the sekret module to your settings.gradle.kts

DatL4g avatar May 05 '24 14:05 DatL4g