Foundation 6.3.3 : Gradle setting - inconsistent module metadata
xhdtn8070 opened this issue · comments
Hello. I'm someone who watched your Foundation lecture and wants to apply it to development using Gradle. Here is the build.gradle file that I have used.
//build.gradle
plugins {
id 'java'
id 'io.freefair.aspectj.post-compile-weaving' version '6.3.0'
id 'io.freefair.lombok' version '6.3.0'
}
group = 'org.blueprint'
version = '1.0-SNAPSHOT'
repositories {
mavenCentral()
maven {
name = 'jitpack.io'
url = 'https://jitpack.io'
}
maven {
name = 'mineacademy-repo'
url = 'https://bitbucket.org/kangarko/libraries/raw/master'
}
maven {
name = 'spigot-repo'
url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots'
}
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
dependencies {
implementation 'org.aspectj:aspectjrt:1.9.19'
implementation 'org.projectlombok:lombok:1.18.26'
annotationProcessor 'org.projectlombok:lombok:1.18.26'
implementation'com.github.kangarko:Foundation:6.3.3'
}
compileJava {
options.encoding = 'UTF-8'
}
In the end, the build failed. I referred to the pom.xml of Foundation-6.3.3 version and also added the path https://bitbucket.org/kangarko/libraries/raw/master. While there were no issues downloading the other libraries, I confirmed that there were problems downloading two specific libraries.
Here is the failed result:
Execution failed for task ':compileJava'.
> Could not resolve all files for configuration ':runtimeClasspath'.
> Could not resolve org.mineacademy.plugin:CMI-API:9.3.1.5.
Required by:
project : > com.github.kangarko:Foundation:6.3.3
> Could not resolve org.mineacademy.plugin:CMI-API:9.3.1.5.
> inconsistent module metadata found. Descriptor: org.mineacademy.plugin:CMI:API-9.3.1.5 Errors: bad module name: expected='CMI-API' found='CMI'
bad version: expected='9.3.1.5' found='API-9.3.1.5'
> Could not resolve org.mineacademy.plugin:Multiverse-Core:4.3.2-SNAPSHOT-870.
Required by:
project : > com.github.kangarko:Foundation:6.3.3
> Could not resolve org.mineacademy.plugin:Multiverse-Core:4.3.2-SNAPSHOT-870.
> inconsistent module metadata found. Descriptor: org.mineacademy.plugin:Multiverse:Core-4.3.2-SNAPSHOT-870 Errors: bad module name: expected='Multiverse-Core' found='Multiverse'
bad version: expected='4.3.2-SNAPSHOT-870' found='Core-4.3.2-SNAPSHOT-870'
* 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.
When analyzing the code in Gradle, the form CMI-API9.3.1.5 was interpreted as artifactId=CMI and version=API-9.3.1.5, causing an error due to incorrect metadata.
If it had worked correctly, it should have been recognized as CMI-API:9.3.1.5, but it was interpreted as CMI:API-9.3.1.5. This problem occurred with two libraries, CMI-API and Multiverse-Core, and since they were dependencies within Foundation 6.3.3, I cannot modify them myself.
Please let me know how to resolve this issue.
Thank you!
What do you think about adding or modifying the CMI-API to CmiApi and removing the hyphen, as well as changing Multiverse-Core to MultiverseCore, in the repository?
Thanks, should be corrected in Foundation 6.3.4