Ошибка использования вилки Groovy FX при попытке сборкиJAVA

Программисты JAVA общаются здесь
Ответить Пред. темаСлед. тема
Anonymous
 Ошибка использования вилки Groovy FX при попытке сборки

Сообщение Anonymous »

Когда я пытаюсь собрать этот проект, я получаю следующую ошибку:
> Configure project :
The method config.bintray is deprecated and will be removed in the future.
[versioning] WARNING - the working copy has unstaged or uncommitted changes.

> Task :compileJava NO-SOURCE

> Task :compileGroovy
/media/ambastos/Documents/home/ambastos/projects/others/java/fork-groovyfx/src/main/groovy/groovyx/javafx/binding/GroovyClosureProperty.java:152: warning: [removal] AccessController in java.security has been deprecated and marked for removal
Closure closureLocalCopy = java.security.AccessController.doPrivileged(new PrivilegedAction() {
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 warning
startup failed:
/media/ambastos/Documents/home/ambastos/projects/others/java/fork-groovyfx/src/main/groovy/groovyx/javafx/canvas/AppendSVGPathOperation.groovy: Could not find class for Transformation Processor groovyx.javafx.beans.FXBindableASTTransformation declared by groovyx.javafx.beans.FXBindable

Я попробовал, но не совсем понял решение этого ответа, добавив некоторые зависимости из JavaFX 17, как показано в этом теперь удаленном ответе, но не сработало :
Это содержимое файла build.gradle:
//import org.javamodularity.moduleplugin.tasks.ModularJavaExec
plugins {
id 'groovy'
id 'idea'
id 'org.kordamp.gradle.groovy-project'
id 'org.kordamp.gradle.bintray'
id 'org.kordamp.gradle.coveralls'
id 'org.openjfx.javafxplugin'
id 'org.asciidoctor.jvm.convert'
//id 'org.jonnyzzz.java9c'
//id 'org.javamodularity.moduleplugin'
id 'com.google.osdetector'
}

if (!project.hasProperty('bintrayUsername')) project.ext.bintrayUsername = ''
if (!project.hasProperty('bintrayApiKey')) project.ext.bintrayApiKey = ''
if (!project.hasProperty('sonatypeUsername')) project.ext.sonatypeUsername = ''
if (!project.hasProperty('sonatypePassword')) project.ext.sonatypePassword = ''

config {
release = (rootProject.findProperty('release') ?: false).toBoolean()

info {
name = 'Groovyfx'
vendor = 'Groovyfx'
description = 'A library for writing JavaFX applications in the Groovy language'
inceptionYear = '2011'
tags = ['Groovy', 'JavaFX', 'GroovyFX']

links {
website = 'http://groovyfx.org'
issueTracker = 'https://github.com/groovyfx-project/groovyfx/issues'
scm = 'https://github.com/groovyfx-project/groovyfx.git'
}

people {
[
JimClarke5 : 'Jim Clarke',
deanriverson : 'Dean Iverson',
russel : 'Russel Winder',
aalmiray : 'Andres Almiray',
Dierk : 'Dierk König'
].each { devId, devName ->
person {
id = devId
name = devName
roles = ['developer']
}
}
}

implementation { enabled = true }

credentials {
sonatype {
username = project.sonatypeUsername
password = project.sonatypePassword
}
}
}

licensing {
licenses {
license {
id = 'Apache-2.0'
}
}
}

bintray {
credentials {
username = project.bintrayUsername
password = project.bintrayApiKey
}
userOrg = 'groovyfx'
name = 'groovyfx'
githubRepo = 'groovyfx-project/groovyfx'
}

docs {
groovydoc {
replaceJavadoc = true
options {
link 'http://junit.org/javadoc/latest/', 'org.junit.', 'junit.'
link 'http://docs.oracle.com/javase/8/docs/api/', 'java.', 'org.xml.', 'javax.', 'org.w3c.'
link 'http://docs.oracle.com/javase/8/javafx/api/', 'javafx.'
link 'http://docs.groovy-lang.org/latest/html/api/', 'groovy.', 'org.apache.groovy'
}
}
}

/*
coverage {
jacoco {
toolVersion = '0.8.12'
}
}*/
}

repositories {
if (project.hasProperty('groovyfx_useMavenLocal') && Boolean.valueOf(project.groovyfx_useMavenLocal)) { mavenLocal() }
mavenCentral()
}

configurations {
jansi.extendsFrom(runtime)
}

javafx {
modules = [
'javafx.base',
'javafx.graphics',
'javafx.controls',
'javafx.fxml',
'javafx.swing',
'javafx.web',
'javafx.media'
]
}

dependencies {
implementation 'org.openjfx:javafx-controls:17.0.1'
implementation 'org.openjfx:javafx-fxml:17.0.1'
implementation "org.apache.groovy:groovy-all:${groovyfx_groovyVersion}"
testImplementation "junit:junit:${groovyfx_junitVersion}"
jansi "org.fusesource.jansi:jansi:${groovyfx_jansiVersion}"
testImplementation("org.spockframework:spock-core:${groovyfx_spockVersion}") {
exclude group: 'org.apache.groovy', module: 'groovy-all'
}

}

// DO 'gradlew licenseFormat' TO FIX LICENSE ISSUES
license {
mapping {
java = 'SLASHSTAR_STYLE'
groovy = 'SLASHSTAR_STYLE'
gdsl = 'SLASHSTAR_STYLE'
dsld = 'SLASHSTAR_STYLE'
fxml = 'XML_STYLE'
}
exclude '**/*.png'
exclude '**/*.jpg'
}

idea {
module {
// excludeDirs += file('gradle/') // Gradle directory including the wrapper subdirectory.
excludeDirs += file('.settings/') // Eclipse settings directory.
excludeDirs += file('bin') // Eclipse compilation directory.
excludeDirs += file('out') // IDEA compilation directory.
excludeDirs += file('build') // Gradle compilation directory.
}
project {
jdkName '11'
languageLevel '11'
ipr {
withXml { provider ->
final node = provider.asNode()
final component = provider.asNode().component
node.component.find { it.'@name' == 'VcsDirectoryMappings' }.mapping[0].'@vcs' = 'Git'
final gradleSettings = node.appendNode('component', [name: 'GradleSettings'])
gradleSettings.appendNode('option', [name: 'linkedProjectPath', value: '$PROJECT_DIR$/build.gradle'])
}
}
}
}

asciidoctor {
attributes toc: 'left',
doctype: 'book',
icons: 'font',
encoding: 'utf-8',
sectlink: true,
sectanchors: true,
numbered: true,
linkattrs: true,
imagesdir: 'images',
stylesheet: 'css/style.css',
'source-highlighter': 'coderay',
'groovyfx-version': project.version,
'groovy-version': project.groovyfx_groovyVersion
}

processResources {
from(sourceSets.main.resources.srcDirs) {
filter(org.apache.tools.ant.filters.ReplaceTokens, tokens: [
'groovyfx.version': project.version
])
}
}

// ------------- compiling demo source ---------------

sourceSets {
demo {
compileClasspath += sourceSets.main.output + configurations.runtimeClasspath
runtimeClasspath += sourceSets.main.output
groovy {
srcDir 'src/demo/groovy'
}
resources {
srcDir 'src/demo/resources'
}
}
}

// ---------------- dynamic tasks to run demos ------------------

new File('src/demo/groovy/demo').eachFileMatch(~/.*Demo.groovy/) { file ->
def demoClassName = file.name - '.groovy'
task "run$demoClassName"(type: JavaExec) {
group = "Demo"
description = "Run the $demoClassName program"
main = "groovyfx.demo/demo.$demoClassName"
}
}

и содержимое settings.gradle:
pluginManagement {
repositories {
jcenter()
gradlePluginPortal()
}
plugins {
id 'org.kordamp.gradle.groovy-project' version kordampPluginVersion
id 'org.kordamp.gradle.bintray' version kordampPluginVersion
id 'org.kordamp.gradle.coveralls' version kordampPluginVersion
id 'org.openjfx.javafxplugin' version '0.1.0'
id 'org.asciidoctor.jvm.convert' version '3.3.2'
//id 'org.jonnyzzz.java9c' version '0.2.3'
//id 'org.javamodularity.moduleplugin' version '1.8.15'
id 'com.google.osdetector' version '1.6.2'
}
}

Моя ОС — Linux Mint 22. Я только клонирую проект и добавляю эти строки (предложено из связанного сообщения):
implementation 'org.openjfx:javafx-controls:17.0.1'
implementation 'org.openjfx:javafx-fxml:17.0.1'


Подробнее здесь: https://stackoverflow.com/questions/788 ... y-to-build
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «JAVA»