https://kotlinlang.org logo
d

David Smith

07/23/2021, 3:24 PM
has anyone ever managed to include a git source repo in a gradle project?
m

mcpiroman

07/23/2021, 4:06 PM
I have. But maybe better asked in #gradle?
d

David Smith

07/23/2021, 4:10 PM
I just managed to get it working
p

Peter Ertl

07/25/2021, 2:32 PM
Sharing your solution would be a way to give back to the community that you request help from
d

David Smith

07/25/2021, 3:20 PM
good point. In settings.gradle
Copy code
sourceControl {
    gitRepository(uri("<ssh://git@github.com/MyOrg/mylib.git>")) {
        producesModule("io.myorg:mylib")
    }
}
and importantly, in build.gradle.kts:
Copy code
implementation("io.myorg:myapp:1.0") {
                    version {
                        branch = "main"
                    }
                }
the two parts that I was missing were the
ssh://
and the
version.branch = main
6 Views