Advertisement
Guest User

Untitled

a guest
Sep 13th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 4.09 KB | None | 0 0
  1. buildscript {
  2.     repositories {
  3.         jcenter()
  4.         mavenCentral()
  5.         maven {
  6.             name = "forge"
  7.             url = "http://files.minecraftforge.net/maven"
  8.         }
  9.         maven {
  10.             name = "sonatype"
  11.             url = "https://oss.sonatype.org/content/repositories/snapshots/"
  12.         }
  13.     }
  14.     dependencies {
  15.         classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
  16.         classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
  17.     }
  18. }
  19.  
  20. apply plugin: 'forge'
  21.  
  22. version = "0.2.0"
  23. group= "ru.rarescrap.tabinventory" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
  24. archivesBaseName = "TabInventoryLib"
  25.  
  26. minecraft {
  27.     version = "1.7.10-10.13.4.1558-1.7.10"
  28.     runDir = "eclipse"
  29. }
  30.  
  31. dependencies {
  32.     // you may put jars on which you depend on in ./libs
  33.     // or you may define them like so..
  34.     //compile "some.group:artifact:version:classifier"
  35.     //compile "some.group:artifact:version"
  36.  
  37.     // real examples
  38.     //compile 'com.mod-buildcraft:buildcraft:6.0.8:dev'  // adds buildcraft to the dev env
  39.     //compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
  40.  
  41.     // for more info...
  42.     // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
  43.     // http://www.gradle.org/docs/current/userguide/dependency_management.html
  44.  
  45. }
  46.  
  47. processResources
  48. {
  49.     // this will ensure that this task is redone when the versions change.
  50.     inputs.property "version", project.version
  51.     inputs.property "mcversion", project.minecraft.version
  52.  
  53.     // replace stuff in mcmod.info, nothing else
  54.     from(sourceSets.main.resources.srcDirs) {
  55.         include 'mcmod.info'
  56.  
  57.         // replace version and mcversion
  58.         expand 'version':project.version, 'mcversion':project.minecraft.version
  59.     }
  60.  
  61.     // copy everything else, thats not the mcmod.info
  62.     from(sourceSets.main.resources.srcDirs) {
  63.         exclude 'mcmod.info'
  64.     }
  65. }
  66.  
  67. apply plugin: 'maven-publish'
  68. publishing {
  69.     publications {
  70.         MyPublication(MavenPublication) {
  71.             from components.java
  72.             groupId = "com.github.rarescrap"
  73.             artifactId = "TabInventoryLib-"+project.version //project.archivesBaseName
  74.             version = project.version
  75.             //artifact "TabInventoryLib-"+project.version
  76.             //artifact deobfJar
  77.             artifact sourcesJar
  78.             //artifact apiJar
  79.             //artifact jar
  80.         }
  81.     }
  82. //    repositories {
  83. //        maven {
  84. //            url "https://oss.sonatype.org/service/local/staging/deploy/maven2"
  85. //            credentials {
  86. //                username RareScrap
  87. //                password Ponyklok%1997
  88. //            }
  89. //        }
  90. //    }
  91. }
  92.  
  93. task sourcesJar(type: Jar) {
  94.     from sourceSets.main.allJava
  95.     classifier = 'sources'
  96. }
  97.  
  98. task javadocJar(type: Jar) {
  99.     from javadoc
  100.     classifier = 'javadoc'
  101. }
  102.  
  103.  
  104. apply plugin: 'com.jfrog.bintray'
  105. bintray {
  106.     user = 'rarescrap'
  107.     key = MY_KEY
  108.     publications = ['MyPublication']
  109. //    configurations = ['archives']
  110.     pkg {
  111.         repo = 'MinecraftTabInventory'
  112.         name = 'minecraft-tab-inventory'
  113.         userOrg = 'rarescrap'
  114.         githubRepo = 'rarescrap/MinecraftTabInventory'
  115.         vcsUrl = 'https://github.com/RareScrap/MinecraftTabInventory.git'
  116.         licenses = ['GPL-3.0']
  117.         //publications = ['MyPublication']
  118.         publish = true
  119.         version {
  120.             name = '0.2.0'
  121.             desc = 'Firstly on jcenter!'
  122.             released  = new Date()
  123.             vcsTag = '0.2.0'
  124.             //attributes = ['gradle-plugin': 'com.use.less:com.use.less.gradle:gradle-useless-plugin']
  125.         }
  126.     }
  127. }
  128.  
  129. // это блок будет обработан плагином bintray-release
  130. //publish {
  131. //    userOrg = 'rarescrap'
  132. //    groupId = 'com.github'
  133. //    artifactId = 'minecraft-tab-inventory'
  134. //    publishVersion = '0.0.8'
  135. //    desc = '[1.7.10] Inventory with tabs'
  136. //    licences = ['GPL-3.0']
  137. //    website = 'https://github.com/RareScrap/MinecraftTabInventory'
  138. //}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement