Java – gradle: ‘compile’ cannot be applied
•
Java
Today, I started a new JDK 11 project with gradle 5.0 (using gradle wrapper) and created a basic build script:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.google.gradle:osdetector-gradle-plugin:1.6.0'
}
}
plugins {
id 'java'
}
apply plugin: 'com.google.osdetector'
ext.platform = osdetector.os == 'osx' ? 'mac' : osdetector.os == 'windows' ? 'win' : osdetector.os
version = '0.1.0'
repositories {
mavenCentral()
}
dependencies {
compile "org.openjfx:javafx-graphics:11:$platform"
}
This – quite basic – build script causes errors
Is this JDK 11, gradle 5.0 or a user error? I've never seen this before
Solution
According to the support of JetBrains, this is a known error and will be released on March 18, 2018 1 repair
See: https://youtrack.jetbrains.com/issue/IDEA-203393
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码
