Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wiki 上的一些问题 #39

Closed
FurryRbl opened this issue Dec 6, 2022 · 3 comments
Closed

Wiki 上的一些问题 #39

FurryRbl opened this issue Dec 6, 2022 · 3 comments

Comments

@FurryRbl
Copy link

FurryRbl commented Dec 6, 2022

wiki 上给出直接添加 Shimmer 为依赖方法不正确。

repositories{ //add our maven first
    maven {
        url "https://maven.firstdarkdev.xyz/snapshots"
    }
 }

// Forge
implementation fg.deobf("com.lowdragmc.shimmer:Shimmer-forge:${minecraft_version}:${shimmer_version}")
// Fabric
modImplementation "com.lowdragmc.shimmer:Shimmer-fabric:${minecraft_version}:${shimmer_version}"

//for architectury user, you can also just import shimmer's common jar in you common module
modImplementation "com.lowdragmc.shimmer:Shimmer-common:${minecraft_version}:${shimmer_version}"

上面内容应该修改为

repositories{ //add our maven first
    maven {
        url "https://maven.firstdarkdev.xyz/snapshots"
    }
 }

// Forge
implementation fg.deobf("com.lowdragmc.shimmer:Shimmer-forge:${minecraft_version}-${shimmer_version}")
// Fabric
modImplementation "com.lowdragmc.shimmer:Shimmer-fabric:${minecraft_version}-${shimmer_version}"

//for architectury user, you can also just import shimmer's common jar in you common module
modImplementation "com.lowdragmc.shimmer:Shimmer-common:${minecraft_version}-${shimmer_version}"

其中改变的是 ${minecraft_version}:${shimmer_version} 里面的":"为"-",否则Gradle 无法下载到文件。

并且Shimmer 的 Module 还依赖ModMenu、Cloth Config、Sodium和Mixin Extras

需要添加以下存储库

repositories {
    maven {
        url "https://maven.shedaniel.me/"
    }
    maven {
         url 'https://jitpack.io'
    }
    maven {
        url "https://cursemaven.com"
        content {
            includeGroup "curse.maven"
        }
    }
}

对于ModMenu和Sodium
添加 https://maven.terraformersmc.com/releases/https://api.modrinth.com/maven 没有任何效果

因为其使用了Curse Maven的includeGroup。

@Yefancy
Copy link
Member

Yefancy commented Dec 6, 2022

感谢指正

@Yefancy Yefancy closed this as completed Dec 6, 2022
@zomb-676
Copy link
Contributor

zomb-676 commented Dec 6, 2022

对于Forge应该是正常的,但是对于Fbaric,根据我这边的测试,它会读取pom中的依赖尝试获取

根据我在的discord找到的一张图片
https://discord.com/channels/792699517631594506/1020312385631813643/1020314702305304716
对于ModMenu,可以换用modRuntimeOnly解决
但是对于Sodium,shimmer在编译时和运行时都需要这个依赖
但是即使使用了图中下方的右侧Configuration,即modImplementation,它仍然会被写入pom作为依赖
之后也许可以自建一个Configuration
在正常任务中为modImplementation,而在upload任务中,转为modCompileOnly来避免将依赖直接写入pom文件
在能解决之前,我会把这个issue一直ping着

我们尝试过在upload任务中,将产生的.pom文件的dependencies全部删去
但是在同时产生的.module文件中,仍然存在着依赖描述

@zomb-676 zomb-676 pinned this issue Dec 6, 2022
@MarbleGateKeeper
Copy link

没必要加那么多存储库地址,直接

    implementation fg.deobf("com.lowdragmc.shimmer:Shimmer-forge:${shimmer_minecraft_version}-${shimmer_version}") { transitive = false }

不就行了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants