Advertisement
akSource

エンチャント交換MODのbuild.gradleファイル

Mar 8th, 2015
350
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 1.82 KB | None | 0 0
  1. //サブプロジェクト別にmavenリポジトリを読み込む場合。
  2. repositories {
  3.     maven {
  4.         name = "potionextension"
  5.         url = "http://aksource.github.io/maven/"
  6.     }
  7. }
  8. //依存してい。
  9. dependencies {
  10.     compile 'com.ak:PotionExtension:1.7.10-1.1.1', project(':MultiToolHolders'), files('lib/MCEconomy2-2.4.4-1.7.10-dev.jar'), files('lib/SextiarySector-2.4.3.c-1.7.10-dev.jar')
  11. }
  12. //jarのマニフェストを変更する場合。
  13. jar {
  14.     manifest {
  15.         //ak.EnchantChanger.asm.AKInternalCorePlugin
  16.         //codechicken.core.launch.DepLoader
  17.         attributes 'FMLCorePlugin': 'ak.EnchantChanger.asm.AKInternalCorePlugin', 'FMLCorePluginContainsFMLMod': 'true'
  18.     }
  19. }
  20. //バージョン指定。
  21. version = "1.7.10-1.8.38"
  22. minecraft {
  23.     //ソースファイル内の、該当文字列をビルド前に置き換える。mcmod.infoは別なので注意。
  24.     //ルートプロジェクト側ので十分かも。。。。
  25.     replace '@VERSION@', project.version
  26.     replace '@MC_VERSION@', version
  27. }
  28. //mcmod.info内の文字列の置き換え。リソースファイル扱いのものはこちらで行う必要あり。
  29. //各サブプロジェクトで記述しておく必要あり。
  30. processResources {
  31.     // this will ensure that this task is redone when the versions change.
  32.     inputs.property "version", project.version
  33.     inputs.property "mcversion", project.minecraft.version
  34.  
  35.     // replace stuff in mcmod.info, nothing else
  36.     from(sourceSets.main.resources.srcDirs) {
  37.         include 'mcmod.info'
  38.  
  39.         // replace version and mcversion
  40.         expand 'version':project.version, 'mcversion':project.minecraft.version
  41.     }
  42.  
  43.     // copy everything else, thats not the mcmod.info
  44.     from(sourceSets.main.resources.srcDirs) {
  45.         exclude 'mcmod.info'
  46.     }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement