I've been playing around with gradle and multi-repository projects recently and I found out about gradle's source dependencies https://blog.gradle.org/introducing-source-dependencies. Since I thought it was interesting I've been trying to get it to work. I have managed to get a project working and building, however VSCode is yelling at me that the import cannot be resolved. I would appreciate some help figuring out a solution to this as I can't find much out there about this on the interwebs.
Repos:
- Application: https://github.com/EliSauder/robot-test/tree/e652b3670f2bb63f1224c55d346fc5c95d0b1d49
- Library: https://github.com/EliSauder/robot-lib-test/tree/noFRC
Application settings.gradle:
sourceControl {
gitRepository("https://github.com/EliSauder/robot-lib-test.git") {
producesModule("org.frcnomad:lib")
}
}
Application build.gradle:
plugins {
id "application"
}
group = 'org.frcnomad'
repositories {
mavenCentral()
}
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
mainClassName = 'org.frcnomad.robot.Main'
dependencies {
implementation('org.frcnomad:lib') {
version {
branch = 'noFRC'
}
}
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.1'
testImplementation "org.mockito:mockito-core:2.+"
testImplementation "org.mockito:mockito-junit-jupiter:2.+"
}
tasks.named('test') {
useJUnitPlatform()
}