Skip to content

Commit

Permalink
Fix gradle sync
Browse files Browse the repository at this point in the history
  • Loading branch information
Technici4n committed Oct 25, 2024
1 parent 5eb28c9 commit 4eb62ee
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,7 @@ public void apply(Project project) {
var writeNeoDevConfig = neoForgeProject.getTasks().named("writeNeoDevConfig", WriteUserDevConfig.class);

Consumer<Configuration> configureLegacyClasspath = spec -> {
spec.getDependencies().addLater(mcAndNeoFormVersion.map(v -> dependencyFactory.create("net.neoforged:neoform:" + v).capabilities(caps -> {
caps.requireCapability("net.neoforged:neoform-dependencies");
})));
spec.getDependencies().add(projectDep(dependencyFactory, neoForgeProject, "installer"));
spec.getDependencies().add(projectDep(dependencyFactory, neoForgeProject, "moduleOnly"));
spec.getDependencies().add(projectDep(dependencyFactory, neoForgeProject, "modDevRuntimeElements"));
spec.getDependencies().add(projectDep(dependencyFactory, neoForgeProject, "userdevCompileOnly"));
// TODO: Convert into a cross-project dependency too
spec.getDependencies().add(
Expand Down
9 changes: 0 additions & 9 deletions coremods/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,6 @@ plugins {
id 'neoforge.formatting-conventions'
}

repositories {
maven { url = 'https://maven.neoforged.net/releases' }
maven {
name 'Mojang'
url 'https://libraries.minecraft.net'
}
mavenCentral()
}

jar {
manifest {
attributes(
Expand Down
8 changes: 8 additions & 0 deletions coremods/settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
repositories {
maven { url = 'https://maven.neoforged.net/releases' }
maven {
name 'Mojang'
url 'https://libraries.minecraft.net'
}
mavenCentral()
}
16 changes: 12 additions & 4 deletions projects/neoforge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ plugins {

apply plugin : net.neoforged.neodev.NeoDevPlugin

// Because of the source set reference.
evaluationDependsOn(":neoforge-coremods")

gradleutils.setupSigning(project: project, signAllPublications: true)

changelog {
Expand Down Expand Up @@ -67,6 +70,9 @@ neoDev {
minecraft {
sourceSet sourceSets.main
}
"neoforge-coremods" {
sourceSet project(":neoforge-coremods").sourceSets.main
}
}
}

Expand Down Expand Up @@ -106,6 +112,12 @@ dependencies {
strictly project.asm_version
}
}
// Also override ASM in implementation
implementation(asmModule) {
version {
strictly project.asm_version
}
}
}
moduleOnly "cpw.mods:bootstraplauncher:${project.bootstraplauncher_version}"
moduleOnly "net.neoforged:JarJarFileSystems:${project.jarjar_version}"
Expand Down Expand Up @@ -162,10 +174,6 @@ dependencies {

neoDev {
runs {
configureEach {
gameDirectory.set project.file("run/${it.name}") as File
modSources.add project(":neoforge-coremods").sourceSets.main
}
client {
client()
}
Expand Down

0 comments on commit 4eb62ee

Please sign in to comment.