mirror of
				https://github.com/SquidDev-CC/CC-Tweaked
				synced 2025-11-03 23:22:59 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			122 lines
		
	
	
		
			3.3 KiB
		
	
	
	
		
			Groovy
		
	
	
	
	
	
			
		
		
	
	
			122 lines
		
	
	
		
			3.3 KiB
		
	
	
	
		
			Groovy
		
	
	
	
	
	
plugins {
 | 
						|
    id 'fabric-loom' version '0.5-SNAPSHOT'
 | 
						|
    id 'maven-publish'
 | 
						|
}
 | 
						|
 | 
						|
sourceCompatibility = JavaVersion.VERSION_1_8
 | 
						|
targetCompatibility = JavaVersion.VERSION_1_8
 | 
						|
 | 
						|
version = mod_version
 | 
						|
 | 
						|
group = "dan200.computercraft"
 | 
						|
archivesBaseName = "cc-tweaked-fabric-${mc_version}"
 | 
						|
 | 
						|
repositories {
 | 
						|
    mavenCentral()
 | 
						|
    maven {
 | 
						|
        name "SquidDev"
 | 
						|
        url "https://squiddev.cc/maven"
 | 
						|
    }
 | 
						|
}
 | 
						|
 | 
						|
minecraft {
 | 
						|
    accessWidener = file("src/main/resources/computercraft.accesswidener")
 | 
						|
}
 | 
						|
 | 
						|
configurations {
 | 
						|
    compile.extendsFrom shade
 | 
						|
}
 | 
						|
 | 
						|
dependencies {
 | 
						|
    minecraft "com.mojang:minecraft:${mc_version}"
 | 
						|
    mappings "net.fabricmc:yarn:${mc_version}+build.${mappings_version}:v2"
 | 
						|
    modImplementation "net.fabricmc:fabric-loader:${fabric_loader_version}"
 | 
						|
    modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_api_version}"
 | 
						|
 | 
						|
    modImplementation "me.shedaniel.cloth:config-2:${cloth_config_version}"
 | 
						|
    modImplementation "io.github.prospector:modmenu:${modmenu_version}"
 | 
						|
 | 
						|
    modApi "me.shedaniel.cloth.api:cloth-utils-v1:${project.cloth_api_version}"
 | 
						|
    include "me.shedaniel.cloth.api:cloth-utils-v1:${project.cloth_api_version}"
 | 
						|
 | 
						|
    implementation "blue.endless:jankson:${jankson_version}"
 | 
						|
    implementation 'com.google.code.findbugs:jsr305:3.0.2'
 | 
						|
 | 
						|
    include "me.shedaniel.cloth:config-2:${cloth_config_version}"
 | 
						|
    include "blue.endless:jankson:${jankson_version}"
 | 
						|
    include 'javax.vecmath:vecmath:1.5.2'
 | 
						|
 | 
						|
    compile 'javax.vecmath:vecmath:1.5.2'
 | 
						|
 | 
						|
    shade 'org.squiddev:Cobalt:0.5.1-SNAPSHOT'
 | 
						|
 | 
						|
    testImplementation 'org.junit.jupiter:junit-jupiter-api:5.1.0'
 | 
						|
    testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.1.0'
 | 
						|
 | 
						|
    modRuntime "me.shedaniel:RoughlyEnoughItems-api:5.2.10"
 | 
						|
    modRuntime "me.shedaniel:RoughlyEnoughItems:5.2.10"
 | 
						|
}
 | 
						|
 | 
						|
sourceSets {
 | 
						|
    main {
 | 
						|
        java {
 | 
						|
            exclude 'dan200/computercraft/shared/integration'
 | 
						|
        }
 | 
						|
    }
 | 
						|
}
 | 
						|
 | 
						|
processResources {
 | 
						|
    inputs.property "version", project.version
 | 
						|
 | 
						|
    from(sourceSets.main.resources.srcDirs) {
 | 
						|
        include "fabric.mod.json"
 | 
						|
        expand "version": project.version
 | 
						|
    }
 | 
						|
 | 
						|
    from(sourceSets.main.resources.srcDirs) {
 | 
						|
        exclude "fabric.mod.json"
 | 
						|
    }
 | 
						|
}
 | 
						|
 | 
						|
// ensure that the encoding is set to UTF-8, no matter what the system default is
 | 
						|
// this fixes some edge cases with special characters not displaying correctly
 | 
						|
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
 | 
						|
tasks.withType(JavaCompile) {
 | 
						|
    options.encoding = "UTF-8"
 | 
						|
}
 | 
						|
 | 
						|
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
 | 
						|
// if it is present.
 | 
						|
// If you remove this task, sources will not be generated.
 | 
						|
task sourcesJar(type: Jar, dependsOn: classes) {
 | 
						|
    classifier = "sources"
 | 
						|
    from sourceSets.main.allSource
 | 
						|
}
 | 
						|
 | 
						|
jar {
 | 
						|
    from "LICENSE"
 | 
						|
 | 
						|
    from configurations.shade.collect { it.isDirectory() ? it : zipTree(it) }
 | 
						|
}
 | 
						|
 | 
						|
// configure the maven publication
 | 
						|
publishing {
 | 
						|
    publications {
 | 
						|
        mavenJava(MavenPublication) {
 | 
						|
            // add all the jars that should be included when publishing to maven
 | 
						|
            artifact(remapJar) {
 | 
						|
                builtBy remapJar
 | 
						|
            }
 | 
						|
            artifact(sourcesJar) {
 | 
						|
                builtBy remapSourcesJar
 | 
						|
            }
 | 
						|
        }
 | 
						|
    }
 | 
						|
 | 
						|
    // select the repositories you want to publish to
 | 
						|
    repositories {
 | 
						|
        // uncomment to publish to the local maven
 | 
						|
        // mavenLocal()
 | 
						|
    }
 | 
						|
}
 |