jeziellago / compose-markdown

Markdown Text for Android Jetpack Compose 📋.
MIT License
508 stars 42 forks source link

Unable to Import Composable #11

Closed MrFlibbleUK closed 2 years ago

MrFlibbleUK commented 2 years ago

Hi, trying to import your composable into the latest version of Android Studio and the gradle build fails to find the repo.

https://jcenter.bintray.com/com/github/jeziellago/compose-markdown/0.2.6/compose-markdown-0.2.6.pom

This gives a 403 forbidden.

repositories { google() mavenCentral() maven { url 'https://jitpack.io' } }

dependencies {
implementation 'com.github.jeziellago:compose-markdown:0.2.6'
}

jeziellago commented 2 years ago

Hi @MrFlibbleUK, Try to follow these steps:

  1. Open the file settings.gradle (it looks like that)
    dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        // add jitpack here 👇🏽
        maven { url 'https://jitpack.io' }
       ...
    }
    } 
    ...
  2. Sync the project
  3. Add compose-markdown dependency
    dependencies {
        implementation 'com.github.jeziellago:compose-markdown:0.2.6'
    }
MrFlibbleUK commented 2 years ago

Thanks Jez, noobie dev using the wrong gradle :) Fantastic composable, thanks for all your hard work!