Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //サブプロジェクト別にmavenリポジトリを読み込む場合。
- repositories {
- maven {
- name = "potionextension"
- url = "http://aksource.github.io/maven/"
- }
- }
- //依存してい。
- dependencies {
- 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')
- }
- //jarのマニフェストを変更する場合。
- jar {
- manifest {
- //ak.EnchantChanger.asm.AKInternalCorePlugin
- //codechicken.core.launch.DepLoader
- attributes 'FMLCorePlugin': 'ak.EnchantChanger.asm.AKInternalCorePlugin', 'FMLCorePluginContainsFMLMod': 'true'
- }
- }
- //バージョン指定。
- version = "1.7.10-1.8.38"
- minecraft {
- //ソースファイル内の、該当文字列をビルド前に置き換える。mcmod.infoは別なので注意。
- //ルートプロジェクト側ので十分かも。。。。
- replace '@VERSION@', project.version
- replace '@MC_VERSION@', version
- }
- //mcmod.info内の文字列の置き換え。リソースファイル扱いのものはこちらで行う必要あり。
- //各サブプロジェクトで記述しておく必要あり。
- processResources {
- // this will ensure that this task is redone when the versions change.
- inputs.property "version", project.version
- inputs.property "mcversion", project.minecraft.version
- // replace stuff in mcmod.info, nothing else
- from(sourceSets.main.resources.srcDirs) {
- include 'mcmod.info'
- // replace version and mcversion
- expand 'version':project.version, 'mcversion':project.minecraft.version
- }
- // copy everything else, thats not the mcmod.info
- from(sourceSets.main.resources.srcDirs) {
- exclude 'mcmod.info'
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement