Skip to content

language server does not recognise gradle dependencies #325

@alepekhin

Description

@alepekhin

Dendencies in build.gradle are not recognised.
How to reproduce:
Make a simple gradle project with build.gradle as

plugins {
    id 'java'
}

repositories {
	mavenCentral()
}

dependencies {
	testImplementation(platform('org.junit:junit-bom:5.13.0'))
	testImplementation('org.junit.jupiter:junit-jupiter')
	testRuntimeOnly('org.junit.platform:junit-platform-launcher')
}

test {
	useJUnitPlatform()
}

Create a test in the folder src/test/java as

import org.junit.jupiter.api.Test;

class SimpleTest {
        
    @Test
    void test100() {
        System.out.println("Test running"); ;
    }
}

Open this file in vim and get an error - "package org.junit.jupiter.api does not exists"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions