Merge pull request #897 from martemen/GradleFix

Issue #895: Gradle fix
This commit is contained in:
HbmMods 2023-02-06 07:53:51 +01:00 committed by GitHub
commit e37f2c819f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 34 additions and 13 deletions

View File

@ -5,17 +5,19 @@ buildscript {
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT' classpath ('com.anatawa12.forge:ForgeGradle:1.2-1.0.+') {changing = true}
} }
} }
apply plugin: 'forge' apply plugin: 'forge'
def version_name = version = mod_version
def jsonFile = file('./src/main/resources/mcmod.info') if(!mod_build_number.isEmpty()) {
def parsedJson = new groovy.json.JsonSlurper().parseText(jsonFile.text) version_name = mod_version + "_X" + mod_build_number
version = parsedJson.version version = "[${version_name}]"
}
group = "com.hbm" // http://maven.apache.org/guides/mini/guide-naming-conventions.html group = "com.hbm" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "HBM-NTM" archivesBaseName = "HBM-NTM"
compileJava.options.encoding = 'UTF-8'
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
@ -62,17 +64,17 @@ repositories {
} }
dependencies { dependencies {
compile 'codechicken:CodeChickenCore:1.7.10-1.0.4.29:dev' implementation 'codechicken:CodeChickenCore:1.7.10-1.0.4.29:dev'
compileOnly 'codechicken:CodeChickenCore:1.7.10-1.0.4.29:src' compileOnly 'codechicken:CodeChickenCore:1.7.10-1.0.4.29:src'
compile 'codechicken:CodeChickenLib:1.7.10-1.1.3.140:dev' implementation 'codechicken:CodeChickenLib:1.7.10-1.1.3.140:dev'
compileOnly 'codechicken:CodeChickenLib:1.7.10-1.1.3.140:src' compileOnly 'codechicken:CodeChickenLib:1.7.10-1.1.3.140:src'
compile 'codechicken:NotEnoughItems:1.7.10-1.0.3.74:dev' implementation 'codechicken:NotEnoughItems:1.7.10-1.0.3.74:dev'
compileOnly 'codechicken:NotEnoughItems:1.7.10-1.0.3.74:src' compileOnly 'codechicken:NotEnoughItems:1.7.10-1.0.3.74:src'
//compileOnly 'inventory-tweaks:InventoryTweaks:1.62+beta.84:api' //compileOnly 'inventory-tweaks:InventoryTweaks:1.62+beta.84:api'
compile "li.cil.oc:OpenComputers:MC1.7.10-1.5.+:api" implementation "li.cil.oc:OpenComputers:MC1.7.10-1.5.+:api"
} }
processResources { processResources {
@ -85,7 +87,13 @@ processResources {
include 'mcmod.info' include 'mcmod.info'
// replace version and mcversion // replace version and mcversion
expand 'version':project.version, 'mcversion':project.minecraft.version filesMatching('mcmod.info') {
// replace version, mcversion and credits
expand([
version: version_name,
credits: project.credits
])
}
} }
// copy everything else, thats not the mcmod.info // copy everything else, thats not the mcmod.info

13
gradle.properties Normal file
View File

@ -0,0 +1,13 @@
mod_version=1.0.27
# Empty build number makes a release type
mod_build_number=4480
credits=HbMinecraft, rodolphito (explosion algorithms), grangerave (explosion algorithms),\
\ Hoboy (textures, models), Doctor17 (russian localization), Drillgon200 (effects, models, porting),\
\ UFFR (fork with all sorts of features), Pu-238 (Tom impact effects), Bismarck (chinese localization),\
\ Frooz (models), Minecreep (models), VT-6/24 (models, textures), Pheo (textures, various machines, weapons), Vær (fibrosis, gas centrifuges,\
\ ZIRNOX, CP-1 parts, starter guide), Adam29 (liquid petroleum, ethanol, electric furnace),\
\ Pashtet (russian localization), MartinTheDragon (calculator, chunk-based fallout), haru315 (spiral point algorithm),\
\ Sten89 (models), Pixelguru26 (textures), TheBlueHat (textures), Aionoso (GUI textures), impbk2002 (project settings),\
\ OvermindDL1 (project settings), TehTemmie (reacher radiation function), Toshayo (improved satellite loot system), Silly541 (config for safe ME drives),\
\ Voxelstice (OpenComputers integration), Pvndols (thorium fuel recipe)

View File

@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.0-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-bin.zip

4
src/main/resources/mcmod.info Executable file → Normal file
View File

@ -3,11 +3,11 @@
"modid": "hbm", "modid": "hbm",
"name": "Hbm's Nuclear Tech", "name": "Hbm's Nuclear Tech",
"description": "A mod that adds weapons, nuclear themed stuff and machines", "description": "A mod that adds weapons, nuclear themed stuff and machines",
"version":"1.0.27_X4501", "version":"${version}",
"mcversion": "1.7.10", "mcversion": "1.7.10",
"url": "", "url": "",
"updateUrl": "", "updateUrl": "",
"credits": "HbMinecraft, rodolphito (explosion algorithms), grangerave (explosion algorithms), Hoboy (textures, models), Doctor17 (russian localization), Drillgon200 (effects, models, porting), UFFR (fork with all sorts of features), Pu-238 (Tom impact effects), Bismarck (chinese localization), Frooz (models), Minecreep (models), VT-6/24 (models, textures), Pheo (textures, various machines, weapons), Vær (fibrosis, gas centrifuges, ZIRNOX, CP-1 parts, starter guide), Adam29 (liquid petroleum, ethanol, electric furnace), Pashtet (russian localization), MartinTheDragon (calculator, chunk-based fallout), haru315 (spiral point algorithm), Sten89 (models), Pixelguru26 (textures), TheBlueHat (textures), Aionoso (GUI textures), impbk2002 (project settings), OvermindDL1 (project settings), TehTemmie (reacher radiation function), Toshayo (improved satellite loot system), Silly541 (config for safe ME drives), Voxelstice (OpenComputers integration), Pvndols (thorium fuel recipe)", "credits": "${credits}",
"logoFile": "", "logoFile": "",
"screenshots": [], "screenshots": [],
"dependencies": [] "dependencies": []