Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
345 views
in Technique[技术] by (71.8m points)

java - VSCode not Recognizing Gradle Source Dependency

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()
}
question from:https://stackoverflow.com/questions/65912344/vscode-not-recognizing-gradle-source-dependency

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...