VSCode not Recognizing Gradle Source Dependency

Viewed 1850

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 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()
}
0 Answers
Related