Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
164 changes: 82 additions & 82 deletions common/build.gradle
Original file line number Diff line number Diff line change
@@ -1,82 +1,82 @@
plugins {
id 'multiloader-common'
id 'net.neoforged.moddev'
}

neoForge {
neoFormVersion = neo_form_version
// Automatically enable AccessTransformers if the file exists
def at = file('src/main/resources/META-INF/accesstransformer.cfg')
if (at.exists()) {
accessTransformers.from(at.absolutePath)
}
}

dependencies {
// Fabric and NeoForge both bundle Fabric Mixin, so it is safe to use it in common
// If you need to update, check what version they are using to see what is compatible
// https://github.com/neoforged/NeoForge/blob/26.2.x/gradle.properties#L37
// https://github.com/FabricMC/fabric-loader/blob/master/gradle.properties#L12
compileOnly('net.fabricmc:sponge-mixin:0.17.3+mixin.0.8.7')
// Fabric and NeoForge both bundle MixinExtras, so it is safe to use it in common
compileOnly(annotationProcessor('io.github.llamalad7:mixinextras-common:0.5.3'))
compileOnly("mezz.jei:jei-${minecraft_version}-common-api:${jei_version}")
compileOnly("me.shedaniel:RoughlyEnoughItems-api-fabric:${rei_version}")
compileOnly("dev.architectury:architectury-fabric:${architectury_version}")
implementation("org.commonmark:commonmark:${commonmark_version}")
implementation("org.commonmark:commonmark-ext-gfm-tables:${commonmark_version}")
implementation("dev.latvian.mods:rhino:${rhino_version}")
testImplementation('com.google.code.gson:gson:2.14.0')
testImplementation('org.junit.jupiter:junit-jupiter:5.11.4')
testRuntimeOnly('org.junit.platform:junit-platform-launcher:1.11.4')
testRuntimeOnly("org.xerial:sqlite-jdbc:${sqlite_jdbc_version}")
testRuntimeOnly("mezz.jei:jei-${minecraft_version}-common-api:${jei_version}")
testRuntimeOnly("me.shedaniel:RoughlyEnoughItems-api-fabric:${rei_version}")
testRuntimeOnly("dev.architectury:architectury-fabric:${architectury_version}")
}

tasks.withType(Test).configureEach { useJUnitPlatform() }

configurations.testCompileClasspath.extendsFrom(configurations.compileClasspath)
configurations.testRuntimeClasspath.extendsFrom(configurations.compileClasspath)

tasks.register('printSqliteProofSupportClasspath') {
doLast {
println(sourceSets.test.runtimeClasspath.asPath)
}
}

configurations {
commonJava {
canBeResolved = false
canBeConsumed = true
}
commonResources {
canBeResolved = false
canBeConsumed = true
}
}

artifacts {
commonJava sourceSets.main.java.sourceDirectories.singleFile
commonResources sourceSets.main.resources.sourceDirectories.singleFile
}

// Implement mcgradleconventions loader attribute
def loaderAttribute = Attribute.of('io.github.mcgradleconventions.loader', String)
['apiElements', 'runtimeElements', 'sourcesElements', 'javadocElements'].each { variant ->
configurations.named(variant) {
attributes {
attribute(loaderAttribute, 'common')
}
}
}
sourceSets.configureEach {
[it.compileClasspathConfigurationName, it.runtimeClasspathConfigurationName].each { variant->
configurations.named(variant) {
attributes {
attribute(loaderAttribute, 'common')
}
}
}
}
plugins {
id 'multiloader-common'
id 'net.neoforged.moddev'
}
neoForge {
neoFormVersion = neo_form_version
// Automatically enable AccessTransformers if the file exists
def at = file('src/main/resources/META-INF/accesstransformer.cfg')
if (at.exists()) {
accessTransformers.from(at.absolutePath)
}
}
dependencies {
// Fabric and NeoForge both bundle Fabric Mixin, so it is safe to use it in common
// If you need to update, check what version they are using to see what is compatible
// https://github.com/neoforged/NeoForge/blob/26.2.x/gradle.properties#L37
// https://github.com/FabricMC/fabric-loader/blob/master/gradle.properties#L12
compileOnly('net.fabricmc:sponge-mixin:0.17.3+mixin.0.8.7')
// Fabric and NeoForge both bundle MixinExtras, so it is safe to use it in common
compileOnly(annotationProcessor('io.github.llamalad7:mixinextras-common:0.5.3'))
compileOnly("mezz.jei:jei-${minecraft_version}-common-api:${jei_version}")
compileOnly("me.shedaniel:RoughlyEnoughItems-api-fabric:${rei_version}")
compileOnly("dev.architectury:architectury-fabric:${architectury_version}")
implementation("org.commonmark:commonmark:${commonmark_version}")
implementation("org.commonmark:commonmark-ext-gfm-tables:${commonmark_version}")
implementation("dev.latvian.mods:rhino:${rhino_version}")
testImplementation('com.google.code.gson:gson:2.14.0')
testImplementation('org.junit.jupiter:junit-jupiter:5.11.4')
testRuntimeOnly('org.junit.platform:junit-platform-launcher:6.1.2')
testRuntimeOnly("org.xerial:sqlite-jdbc:${sqlite_jdbc_version}")
testRuntimeOnly("mezz.jei:jei-${minecraft_version}-common-api:${jei_version}")
testRuntimeOnly("me.shedaniel:RoughlyEnoughItems-api-fabric:${rei_version}")
testRuntimeOnly("dev.architectury:architectury-fabric:${architectury_version}")
}
tasks.withType(Test).configureEach { useJUnitPlatform() }
configurations.testCompileClasspath.extendsFrom(configurations.compileClasspath)
configurations.testRuntimeClasspath.extendsFrom(configurations.compileClasspath)
tasks.register('printSqliteProofSupportClasspath') {
doLast {
println(sourceSets.test.runtimeClasspath.asPath)
}
}
configurations {
commonJava {
canBeResolved = false
canBeConsumed = true
}
commonResources {
canBeResolved = false
canBeConsumed = true
}
}
artifacts {
commonJava sourceSets.main.java.sourceDirectories.singleFile
commonResources sourceSets.main.resources.sourceDirectories.singleFile
}
// Implement mcgradleconventions loader attribute
def loaderAttribute = Attribute.of('io.github.mcgradleconventions.loader', String)
['apiElements', 'runtimeElements', 'sourcesElements', 'javadocElements'].each { variant ->
configurations.named(variant) {
attributes {
attribute(loaderAttribute, 'common')
}
}
}
sourceSets.configureEach {
[it.compileClasspathConfigurationName, it.runtimeClasspathConfigurationName].each { variant->
configurations.named(variant) {
attributes {
attribute(loaderAttribute, 'common')
}
}
}
}
Loading