1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- plugins {
- id "architectury-plugin" version "2.0.65"
- id "forgified-fabric-loom" version "0.6.54" apply false
- id 'com.jfrog.bintray' version '1.8.4'
- id 'com.matthewprenger.cursegradle' version '1.4.0' apply false
- id 'maven-publish'
- }
- architectury {
- minecraft = rootProject.minecraft_version
- }
- subprojects {
- apply plugin: "forgified-fabric-loom"
- loom {
- silentMojangMappingsLicense()
- useFabricMixin = true
- }
- }
- allprojects {
- apply plugin: 'java'
- apply plugin: 'architectury-plugin'
- ext {
- isSnapshot = System.getenv("PR_NUM") != null
- }
- def runNumber = (System.getenv("GITHUB_RUN_NUMBER") == null ? "9999" : System.getenv("GITHUB_RUN_NUMBER"))
- if (!ext.isSnapshot) {
- version = rootProject.base_version + "." + runNumber
- archivesBaseName = rootProject.archives_base_name
- } else {
- version = rootProject.base_version + "-PR." + System.getenv("PR_NUM") + "." + runNumber
- archivesBaseName = rootProject.archives_base_name_snapshot
- }
- group = rootProject.maven_group
- tasks.withType(JavaCompile) {
- options.encoding = "UTF-8"
- // The Minecraft launcher currently installs Java 8 for users, so your mod probably wants to target Java 8 too
- // JDK 9 introduced a new way of specifying this that will make sure no newer classes or methods are used.
- // We'll use that if it's available, but otherwise we'll use the older option.
- def targetVersion = 8
- if (JavaVersion.current().isJava9Compatible()) {
- options.release = targetVersion
- }
- }
- }
- bintray {
- user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
- key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_KEY')
- publications = ["mavenCommon", "mavenFabric", "mavenForge"]
- publish = true
- pkg {
- repo = "cloth-config-2"
- name = "config-2"
- userOrg = "shedaniel"
- licenses = ["LPGL v3"]
- version {
- name = project.version
- vcsTag = project.version
- released = new Date()
- desc = "Cloth Config API for Minecraft"
- githubRepo = 'architectury/ClothConfig'
- websiteUrl = 'https://github.com/architectury/ClothConfig'
- issueTrackerUrl = 'https://github.com/architectury/ClothConfig/issues'
- vcsUrl = 'https://github.com/architectury/ClothConfig.git'
- }
- }
- }
|