DatL4g / Sekret

🔒 Deeply hide secrets with Kotlin Multiplatform
Apache License 2.0
41 stars 0 forks source link

Unable to install plugin #4

Closed lmiskovic closed 2 months ago

lmiskovic commented 7 months ago

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

DatL4g commented 7 months ago

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)

Monabr commented 6 months ago

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

DatL4g commented 6 months ago

@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