1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- plugins {
- id 'fabric-loom' version '0.2.4-SNAPSHOT'
- id 'maven-publish'
- id 'maven'
- id 'signing'
- id 'com.jfrog.bintray' version '1.8.4'
- }
- sourceCompatibility = 1.8
- targetCompatibility = 1.8
- group = "me.shedaniel"
- archivesBaseName = "cloth-config-2"
- version = project.mod_version
- minecraft {
- }
- processResources {
- filesMatching('fabric.mod.json') {
- expand 'version': project.version
- }
- inputs.property "version", project.version
- }
- dependencies {
- minecraft "com.mojang:minecraft:${project.minecraft_version}"
- mappings "net.fabricmc:yarn:${project.yarn_version}"
- modImplementation "net.fabricmc:fabric-loader:${project.fabric_loader_version}"
- modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
- modApi "io.github.prospector.modmenu:ModMenu:${modmenu_version}"
- }
- bintray {
- user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
- key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_KEY')
- publications = ["MyPublication"]
- pkg {
- repo = "ClothConfig"
- name = "ClothConfig2"
- userOrg = "shedaniel"
- licenses = ["Unlicense"]
- vcsUrl = "https://github.com/shedaniel/ClothConfig.git"
- version {
- name = project.version
- vcsTag = project.version
- released = new Date()
- gpg {
- sign = true
- }
- mavenCentralSync {
- sync = true //[Default: true] Determines whether to sync the version to Maven Central.
- user = project.hasProperty('ossToken') ? project.property('ossToken') : System.getenv('OSS_TOKEN')
- //OSS user token: mandatory
- password = project.hasProperty('ossPass') ? project.property('ossPass') : System.getenv('OSS_PASS')
- //OSS user password: mandatory
- close = '1'
- //Optional property. By default the staging repository is closed and artifacts are released to Maven Central. You can optionally turn this behaviour off (by puting 0 as value) and release the version manually.
- }
- }
- }
- }
- // 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
- }
- publishing {
- publications {
- MyPublication(MavenPublication) {
- artifact(file("${project.buildDir}/libs/${project.archivesBaseName}-${project.version}.jar")) {
- builtBy remapJar
- }
- artifact(sourcesJar) {
- builtBy remapSourcesJar
- }
- }
- }
- // select the repositories you want to publish to
- repositories {
- // uncomment to publish to the local maven
- // mavenLocal()
- }
- }
|