首页 > 解决方案 > Gradle 子模块 compileOnly 函数不存在

问题描述

我的应用程序 build.gradle.kts

在此处输入图像描述

我的根 settings.gradle.kts

在此处输入图像描述

我的根 build.gradle.kts

在此处输入图像描述

Build file '/home/gutyerrez/Documents/Hyren Network/core/build.gradle.kts' line: 1

Plugin [id: 'org.jetbrains.kotlin.jvm', version: '1.4.0'] was not found in any of the following sources:

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

标签: kotlingradlecompilation

解决方案


像那样:

subprojects {
    repositories {
        mavenCentral()
    }

    apply {
        plugin("org.springframework.boot")
        plugin("io.spring.dependency-management")
        plugin("org.jetbrains.kotlin.jvm")
    }
}

推荐阅读