I am trying to add a git repository (https://github.com/FHNW-IP5-IP6/ComposeForms) as a dependency into my project with Gradle and tried the below-listed variants (1.-3.) from Is it possible to declare git repository as dependency in android gradle? but every time when I sync the project I get an Error saying: "Could not resolve com.github.FHNW-IP5-IP6:ComposeForms:master-SNAPSHOT".
I tried the following:
Jitpack (https://jitpack.io/#FHNW-IP5-IP6/ComposeForms/master-SNAPSHOT)
allprojects { repositories { ... maven("https://jitpack.io") // also tried uri https://www.jitpack.io } }
and in app build.gradle
kotlin { sourceSets { named("main") { dependencies { ... implementation("com.github.FHNW-IP5-IP6:ComposeForms:master-SNAPSHOT") } } } }
Git Submodule (named as compose-forms)
include(":compose-forms")
inside settings.gradlekotlin { sourceSets { named("main") { dependencies { ... implementation(project(":compose-forms")) } } } }
New feature in gradle
Inside settings.gradle
sourceControl { gitRepository(uri("https://github.com/FHNW-IP5-IP6/ComposeForms.git")) { producesModule("compose-forms") } }
and in app build.gradle
kotlin { sourceSets { named("main") { dependencies { ... implementation("compose-forms") { version { branch = "master" } } } } } }
I'm running out of options and really need the git repository as a dependency. I would prefer not to have any git submodules inside my project so I prefer numbers 1 and 3 to work. Thanks in Advance for any hint :)