FabricMC / fabric-example-mod

Example Fabric mod
Creative Commons Zero v1.0 Universal
1.67k stars 945 forks source link

Fail to build example mod in 1.19 #190

Closed Fabccc closed 2 years ago

Fabccc commented 2 years ago

Hello,

I'm failing to build the example mod.

Output error

This error shows when i'm trying to build from the CLI

 USER:Fabien |> otomny_mod_1_19\  mardi 10:18:34
[01 min 08 sec] > ./gradlew build

> Configure project :
Fabric Loom: 0.12.51

> Task :compileJava
D:\Otomny_V2\otomny_v2_git\otomny_mod_1_19\src\main\java\net\fabricmc\example\mixin\ExampleMixin.java:10: error: Mixin has no targets
@Mixin(TitleScreen.class)
^
D:\Otomny_V2\otomny_v2_git\otomny_mod_1_19\src\main\java\net\fabricmc\example\mixin\ExampleMixin.java:4: error: package net.minecraft.client.gui.screen does not exist
import net.minecraft.client.gui.screen.TitleScreen;
                                      ^
D:\Otomny_V2\otomny_v2_git\otomny_mod_1_19\src\main\java\net\fabricmc\example\mixin\ExampleMixin.java:10: error: cannot find symbol
@Mixin(TitleScreen.class)
       ^
  symbol: class TitleScreen
3 errors

> Task :compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.

* 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.

* Get more help at https://help.gradle.org

BUILD FAILED in 4s
1 actionable task: 1 executed

What I have done so far

Cloning the project with this command

git clone -b 1.19 https://github.com/FabricMC/fabric-example-mod.git

Editing the gradle.properties to match the current 1.19 configuration on https://fabricmc.net/develop/ :

 USER:Fabien |> otomny_mod_1_19\  mardi 10:24:04
[0,01 sec] > cat .\gradle.properties
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G

# Fabric Properties
        # check these on https://fabricmc.net/develop
        minecraft_version=1.19
        yarn_mappings=1.19+build.4
        loader_version=0.14.8

# Mod Properties
        mod_version = 1.0.0
        maven_group = com.example
        archives_base_name = fabric-example-mod

# Dependencies
        fabric_version=0.57.0+1.19

Generating the sources with the gradle

[0,01 sec] > ./gradlew genSources

> Configure project :
Fabric Loom: 0.12.51
Processing file: minecraft-project-@-merged-named.jar
Processing file: minecraft-project-@-merged-named.jar
:remapping 40 mods (TinyRemapper, intermediary -> named)
:remapping sources

BUILD SUCCESSFUL in 1m 10s
2 actionable tasks: 2 executed

Building the project

> Task :compileJava FAILED
D:\Otomny_V2\otomny_v2_git\otomny_mod_1_19\src\main\java\net\fabricmc\example\mixin\ExampleMixin.java:10: error: Mixin has no targets
@Mixin(TitleScreen.class)
^
D:\Otomny_V2\otomny_v2_git\otomny_mod_1_19\src\main\java\net\fabricmc\example\mixin\ExampleMixin.java:4: error: package net.minecraft.client.gui.screen does not exist
import net.minecraft.client.gui.screen.TitleScreen;
                                      ^
D:\Otomny_V2\otomny_v2_git\otomny_mod_1_19\src\main\java\net\fabricmc\example\mixin\ExampleMixin.java:10: error: cannot find symbol
@Mixin(TitleScreen.class)
       ^
  symbol: class TitleScreen
3 errors

Configuration

 USER:Fabien |> otomny_mod_1_19\  mardi 10:26:48
[3,2 sec] > ./gradlew properties

> Configure project :
Fabric Loom: 0.12.51

> Task :properties

------------------------------------------------------------
Root project 'otomny_mod_1_19'
------------------------------------------------------------

allprojects: [root project 'otomny_mod_1_19']
ant: org.gradle.api.internal.project.DefaultAntBuilder@17c8592b
antBuilderFactory: org.gradle.api.internal.project.DefaultAntBuilderFactory@6a75bb9f
archivesBaseName: fabric-example-mod
archives_base_name: fabric-example-mod
artifacts: org.gradle.api.internal.artifacts.dsl.DefaultArtifactHandler_Decorated@26371058
asDynamicObject: DynamicObject for root project 'otomny_mod_1_19'
autoTargetJvmDisabled: false
base: extension 'base'
baseClassLoaderScope: org.gradle.api.internal.initialization.DefaultClassLoaderScope@4fb0f6db
buildDir: D:\Otomny_V2\otomny_v2_git\otomny_mod_1_19\build
buildFile: D:\Otomny_V2\otomny_v2_git\otomny_mod_1_19\build.gradle
buildPath: :
buildScriptSource: org.gradle.groovy.scripts.TextResourceScriptSource@1ae4ef07
buildscript: org.gradle.api.internal.initialization.DefaultScriptHandler@5d8a1687
childProjects: {}
class: class org.gradle.api.internal.project.DefaultProject_Decorated
classLoaderScope: org.gradle.api.internal.initialization.DefaultClassLoaderScope@e538cc1
clean: task ':clean'
compileJava: task ':compileJava'
compileTestJava: task ':compileTestJava'
components: SoftwareComponentInternal set
configurationActions: org.gradle.configuration.project.DefaultProjectConfigurationActionContainer@432178be
configurationTargetIdentifier: org.gradle.configuration.ConfigurationTargetIdentifier$1@b6f582f
configurations: configuration container
convention: org.gradle.internal.extensibility.DefaultConvention@364e1292
crossProjectModelAccess: org.gradle.api.internal.project.DefaultCrossProjectModelAccess@3b7d14f2
defaultArtifacts: extension 'defaultArtifacts'
defaultTasks: []
deferredProjectConfiguration: org.gradle.api.internal.project.DeferredProjectConfiguration@73d16fab
dependencies: org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler_Decorated@20effde
dependencyLocking: org.gradle.internal.locking.DefaultDependencyLockingHandler_Decorated@4412b78f
dependencyMetaDataProvider: org.gradle.internal.service.scopes.ProjectScopeServices$ProjectBackedModuleMetaDataProvider@179be17b
depth: 0
description: null
detachedState: false
displayName: root project 'otomny_mod_1_19'
distsDirName: distributions
distsDirectory: extension 'base' property 'distsDirectory'
docsDir: D:\Otomny_V2\otomny_v2_git\otomny_mod_1_19\build\docs
docsDirName: docs
eclipse: extension 'eclipse'
ext: org.gradle.internal.extensibility.DefaultExtraPropertiesExtension@6f4f7814
extensions: org.gradle.internal.extensibility.DefaultConvention@364e1292
fabricApi: extension 'fabricApi'
fabric_version: 0.57.0+1.19
fileOperations: org.gradle.api.internal.file.DefaultFileOperations@1a4a8a2c
fileResolver: org.gradle.api.internal.file.BaseDirFileResolver@4b35f825
gradle: build 'otomny_mod_1_19'
group: com.example
idea: extension 'idea'
identityPath: :
inheritedScope: org.gradle.internal.extensibility.ExtensibleDynamicObject$InheritedDynamicObject@36d5801
internalStatus: property(java.lang.Object, fixed(class java.lang.String, integration))
jar: task ':jar'
java: extension 'java'
javaToolchains: extension 'javaToolchains'
layout: org.gradle.api.internal.file.DefaultProjectLayout@17f61fa0
libsDirName: libs
libsDirectory: extension 'base' property 'libsDirectory'
listenerBuildOperationDecorator: org.gradle.configuration.internal.DefaultListenerBuildOperationDecorator@5923fc98
loader_version: 0.14.8
logger: org.gradle.internal.logging.slf4j.OutputEventListenerBackedLogger@3d33d349
logging: org.gradle.internal.logging.services.DefaultLoggingManager@547739be
loom: extension 'loom'
maven_group: com.example
minecraft_version: 1.19
mod_version: 1.0.0
model: root project 'otomny_mod_1_19'
modelIdentityDisplayName: null
modelRegistry: org.gradle.model.internal.registry.DefaultModelRegistry@735b278f
name: otomny_mod_1_19
normalization: org.gradle.normalization.internal.DefaultInputNormalizationHandler_Decorated@35dad240
objects: org.gradle.api.internal.model.DefaultObjectFactory@1650e629
org.gradle.jvmargs: -Xmx1G
owner: root project 'otomny_mod_1_19'
parent: null
parentIdentifier: null
path: :
pluginContext: false
pluginManager: org.gradle.api.internal.plugins.DefaultPluginManager_Decorated@7b079794
plugins: [org.gradle.api.plugins.HelpTasksPlugin@51cab024, org.gradle.buildinit.plugins.BuildInitPlugin@3261208f, org.gradle.buildinit.plugins.WrapperPlugin@2391f944, net.fabricmc.loom.LoomRepositoryPlugin@64ed7195, org.gradle.language.base.plugins.LifecycleBasePlugin@60a2b6bc, org.gradle.api.plugins.BasePlugin@5b7c977f, org.gradle.api.plugins.JvmEcosystemPlugin@778b1e8d, org.gradle.api.plugins.ReportingBasePlugin@7865b830, org.gradle.api.plugins.JavaBasePlugin$Inject@d87f6d6, org.gradle.testing.base.plugins.TestSuiteBasePlugin@32ff4f76, org.gradle.api.plugins.JvmTestSuitePlugin@1d2f40d2, org.gradle.api.plugins.JavaPlugin@48decf7f, org.gradle.api.plugins.JavaLibraryPlugin@7a5da1f4, org.gradle.plugins.ide.eclipse.EclipsePlugin@3211d536, org.gradle.plugins.ide.idea.IdeaPlugin@55df3a76, net.fabricmc.loom.bootstrap.LoomGradlePluginBootstrap@6b44a285, org.gradle.api.publish.plugins.PublishingPlugin@7c81fc18, org.gradle.api.publish.maven.plugins.MavenPublishPlugin@40053edb]
prepareRemapJar: task ':prepareRemapJar'
processOperations: org.gradle.process.internal.DefaultExecActionFactory$DecoratingExecActionFactory@6ca5a027
processResources: task ':processResources'
project: root project 'otomny_mod_1_19'
projectConfigurator: org.gradle.api.internal.project.BuildOperationCrossProjectConfigurator@22bb77bc
projectDir: D:\Otomny_V2\otomny_v2_git\otomny_mod_1_19
projectEvaluationBroadcaster: ProjectEvaluationListener broadcast
projectEvaluator: org.gradle.configuration.project.LifecycleProjectEvaluator@51292ecf
projectPath: :
properties: {...}
providers: org.gradle.api.internal.provider.DefaultProviderFactory_Decorated@383321d7
publicType: org.gradle.api.plugins.BasePluginConvention
publishing: extension 'publishing'
remapJar: task ':remapJar'
remapSourcesJar: task ':remapSourcesJar'
reporting: extension 'reporting'
reportsDir: D:\Otomny_V2\otomny_v2_git\otomny_mod_1_19\build\reports
repositories: repository container
resources: org.gradle.api.internal.resources.DefaultResourceHandler@79d61a6e
rootDir: D:\Otomny_V2\otomny_v2_git\otomny_mod_1_19
rootProject: root project 'otomny_mod_1_19'
rootScript: false
script: false
scriptHandlerFactory: org.gradle.api.internal.initialization.DefaultScriptHandlerFactory@29847f
scriptPluginFactory: org.gradle.configuration.ScriptPluginFactorySelector@18ee9de3
serviceRegistryFactory: org.gradle.internal.service.scopes.ProjectScopeServices$$Lambda$2064/0x00000008018aca18@39723ab0
services: ProjectScopeServices
sourceCompatibility: 17
sourceSets: SourceSet container
sourcesJar: task ':sourcesJar'
standardOutputCapture: org.gradle.internal.logging.services.DefaultLoggingManager@547739be
state: project state 'EXECUTED'
status: integration
subprojects: []
targetCompatibility: 17
taskThatOwnsThisObject: null
tasks: task set
test: task ':test'
testReportDir: D:\Otomny_V2\otomny_v2_git\otomny_mod_1_19\build\reports\tests
testReportDirName: tests
testResultsDir: D:\Otomny_V2\otomny_v2_git\otomny_mod_1_19\build\test-results
testResultsDirName: test-results
testing: extension 'testing'
version: 1.0.0
yarn_mappings: 1.19+build.4
Fabccc commented 2 years ago

I tested with the others branches (1.18 and 1.17), and it's working perfectly fine. I don't understand why it's no pulling all the sources with genSources for the 1.19 version.

modmuss50 commented 2 years ago

👋 We use the issue tracker exclusively for final bug reports and feature requests. However, this issue appears to be better suited for either a discussion thread, or a message on our discord server. Please post your request on one of these, and the conversation can continue there.