Git Product home page Git Product logo

Comments (9)

ben-j69 avatar ben-j69 commented on May 29, 2024

Hello @MaasboDev you did not replace X.Y.Z by the version of the library you want to use ?

from hidden-secrets-gradle-plugin.

MaasboDev avatar MaasboDev commented on May 29, 2024

I did it like is explained in the README and gave me the error I posted.

buildscript {
    repositories {
        google()
        maven {
            url "https://plugins.gradle.org/m2/"
        }
    }
    dependencies {
        classpath "com.klaxit.hiddensecrets:HiddenSecretsPlugin:X.Y.Z"
    }
}

apply plugin: 'com.klaxit.hiddensecrets'

from hidden-secrets-gradle-plugin.

ben-j69 avatar ben-j69 commented on May 29, 2024

@MaasboDev you need to replace X.Y.Z by the version of the lib you want to use, like 0.2.0.

from hidden-secrets-gradle-plugin.

MaasboDev avatar MaasboDev commented on May 29, 2024

I had no errors now adding the dependency, but when I tried to use:

./gradlew hideSecret -Pkey=yourKeyToObfuscate

Got this response:

Welcome to Gradle 8.1!

Here are the highlights of this release:
 - Stable configuration cache
 - Experimental Kotlin DSL assignment syntax
 - Building with Java 20

For more details see https://docs.gradle.org/8.1/release-notes.html

Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
Encryption of the configuration cache is enabled.
Calculating task graph as no configuration cache is available for tasks: hideSecret

0 problems were found storing the configuration cache.

See the complete report at file:///

FAILURE: Build failed with an exception.

* What went wrong:
Task 'hideSecret' not found in root project 'Marvel MD' and its subprojects.

* Try:
> Run gradlew tasks to get a list of available tasks.
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 34s
Configuration cache entry stored.

I can't use Secrets().

from hidden-secrets-gradle-plugin.

ben-j69 avatar ben-j69 commented on May 29, 2024

@MaasboDev did you apply the plugin as explained in the readme ?

from hidden-secrets-gradle-plugin.

MaasboDev avatar MaasboDev commented on May 29, 2024

In my libs.versions.toml:

[versions]
klaxit = "0.2.1"
[plugins]
klaxit = { id = "com.klaxit.hiddensecrets", version.ref = "klaxit" }

In my module level build.gradle.kts (hope is not into app):

alias(libs.plugins.klaxit) apply false

from hidden-secrets-gradle-plugin.

ben-j69 avatar ben-j69 commented on May 29, 2024

@MaasboDev please start the integration by exactly following the readme. For example le "apply false" does not looks good to me.

from hidden-secrets-gradle-plugin.

MaasboDev avatar MaasboDev commented on May 29, 2024

I erased the "apply false" and tried again with "./gradlew hideSecret -Pkey=yourKeyToObfuscate", the result was:

Encryption of the configuration cache is enabled.
Calculating task graph as no configuration cache is available for tasks: hideSecret

> Configure project :
Unzip jar to /Users/XXX/XXX/XXX/build/hidden-secrets-tmp

> Task :hideSecret FAILED
secrets.cpp already exists
CMakeLists.txt already exists
sha256.hpp already exists
sha256.cpp already exists
secrets.hpp already exists
Secrets.kt not found in src/main/

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':hideSecret'.
> Extension with name 'android' does not exist. Currently registered extension names: [ext, libs, versionCatalogs]

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Configuration cache problems found in this build.

10 problems were found storing the configuration cache, 1 of which seems unique.
- Task `:hideSecret` of type `org.gradle.api.DefaultTask`: cannot serialize object of type 'org.gradle.api.internal.project.DefaultProject', a subtype of 'org.gradle.api.Project', as these are not supported with the configuration cache.
  See https://docs.gradle.org/8.1/userguide/configuration_cache.html#config_cache:requirements:disallowed_types

See the complete report at file:///Users/XXXX/XXXX/XXXX/build/reports/configuration-cache/edtw9pl0oj2k7i1dahepoif0c/ah3olnsy4axkmodwkocji2f1f/configuration-cache-report.html

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

* Get more help at https://help.gradle.org

BUILD FAILED in 3s
2 actionable tasks: 1 executed, 1 up-to-date
Configuration cache entry discarded with 10 problems.

from hidden-secrets-gradle-plugin.

ben-j69 avatar ben-j69 commented on May 29, 2024

So the lib is found and now you have to fix your configuration, with something like https://stackoverflow.com/questions/42158019/extension-with-name-android-does-not-exist-error-when-adding-kotlin-to-andro

I will close this issue. Open a new one when the lib is integrated if you have issues using it.

Thanks,

from hidden-secrets-gradle-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.