Giter Club home page Giter Club logo

Comments (13)

murzagalin avatar murzagalin commented on May 27, 2024 1

could you try version 0.13.0, @flixlo

from multiplatform-expressions-evaluator.

flixlo avatar flixlo commented on May 27, 2024 1

It works now, thank you :)

from multiplatform-expressions-evaluator.

murzagalin avatar murzagalin commented on May 27, 2024

Let me check if I can make it public

from multiplatform-expressions-evaluator.

murzagalin avatar murzagalin commented on May 27, 2024

I did the investigation. Unfortunately github packages does not support unauthenticated access to packages.
To access the package you will have to create your own access token: https://docs.github.com/en/[email protected]/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token

make sure you select read:packages permission for the token
image

and change repository part to

    maven {
        url = uri("https://maven.pkg.github.com/murzagalin/multiplatform-expressions-evaluator")
        credentials {
            username = "your username"
            password = "your token"
        }
    }

from multiplatform-expressions-evaluator.

murzagalin avatar murzagalin commented on May 27, 2024

I will change the docs after your confirmation

from multiplatform-expressions-evaluator.

flixlo avatar flixlo commented on May 27, 2024

Ah, I haven't used Github Packages before, and didn't know that it always requires authentication. Adding a hint to the README seems like a good idea :)

I created the PAT with the correct permissions, but I'm still struggeling to make it work. This is what my gradle.kts looks like:

kotlin {
    android()
    iosX64()
    iosArm64()
    iosSimulatorArm64()

    repositories {
        maven {
            url = uri("https://maven.pkg.github.com/murzagalin/multiplatform-expressions-evaluator")
            credentials {
                username = "flixlo"
                password = "ghp_xxx"
            }
        }
    }

    sourceSets {
        val commonMain by getting {
            dependencies {
                implementation("com.github.murzagalin:multiplatform-expressions-evaluator:0.11.0")
            }
        }
        // ...
    }
}

Yet, I get the following error:

Could not resolve com.github.murzagalin:multiplatform-expressions-evaluator:0.11.0.
Required by:
    project :shared

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

Directly accessing the .pom with my username and PAT works properly: https://maven.pkg.github.com/murzagalin/multiplatform-expressions-evaluator/com/github/murzagalin/multiplatform-expressions-evaluator/0.11.0/multiplatform-expressions-evaluator-0.11.0.pom

from multiplatform-expressions-evaluator.

murzagalin avatar murzagalin commented on May 27, 2024

I tested it locally in a kmp project. It seems you are adding the repositories block to a wrong place.
Please add it outside of kotlin block, with other repositories.

I also have couple of questions:
How many modules do you have in the project?
And what is your module structure?

I experienced the same issue, until I added the repo to all modules that required it. In your case it is :shared

from multiplatform-expressions-evaluator.

flixlo avatar flixlo commented on May 27, 2024

I tried different places, even in allprojects { repositories { /*...*/ } }, but I'm still getting the same error.

If it works for you, do you mind sharing your gradle files, or even the whole test-project, so I can compare what I'm doing different?

from multiplatform-expressions-evaluator.

murzagalin avatar murzagalin commented on May 27, 2024

I did the investigation. I could reproduce the problem. Check this repo

and the problem happened because of iosSimulatorArm64() target. When I commented it, everything started working. Is it sth critical?

from multiplatform-expressions-evaluator.

flixlo avatar flixlo commented on May 27, 2024

@murzagalin Thx for the investigation, I can reproduce that.

What surprised me: If I switch to publishToMavenLocal and implementation("com.github.murzagalin:multiplatform-expressions-evaluator:local"), the local build works properly with my app (that's why I previously created the PR), while the production version of the lib does not (as explained above). When setting up a new empty kmm app project (as you did in the test repo), the error persists - even with the local build of the lib. I guess the configuration of my app differs from the test project, I will check that later.

Using iosSimulatorArm64() would be important to me, can you please confirm the following:

Change the configuration of multiplatform-expressions-evaluator from

    ios {
        binaries {
            framework {
                baseName = "ExpressionsEvaluator"
            }
        }
    }

to

    iosX64()
    iosArm64()
    iosSimulatorArm64()

I tried this locally, and it seems to work with the test project.

from multiplatform-expressions-evaluator.

murzagalin avatar murzagalin commented on May 27, 2024

could you open a PR with these changes?

from multiplatform-expressions-evaluator.

murzagalin avatar murzagalin commented on May 27, 2024

or I will create a PR!

from multiplatform-expressions-evaluator.

murzagalin avatar murzagalin commented on May 27, 2024

could you check and approve if this is what you meant #3

from multiplatform-expressions-evaluator.

Related Issues (4)

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.