|
| 1 | +apply plugin: "curseforge" |
| 2 | +apply plugin: 'maven' |
| 3 | + |
| 4 | +if(project.hasProperty("curseforge_key") && project.hasProperty("changelog")) { |
| 5 | + curse { |
| 6 | + apiKey = project.curseforge_key |
| 7 | + projectId = "TODO" // my project url is http://minecraft.curseforge.com/mc-mods/TODO/ |
| 8 | + changelog = new File(project.changelog).text |
| 9 | + releaseType = "release" |
| 10 | + |
| 11 | + additionalArtifact deobfJar |
| 12 | + additionalArtifact apiJar |
| 13 | + additionalArtifact sourceJar |
| 14 | + additionalArtifact javadocJar |
| 15 | + } |
| 16 | +} |
| 17 | + |
| 18 | +configurations { |
| 19 | + deployerJars |
| 20 | +} |
| 21 | + |
| 22 | +dependencies { |
| 23 | + deployerJars "org.apache.maven.wagon:wagon-ftp:2.2" |
| 24 | +} |
| 25 | + |
| 26 | +uploadArchives { |
| 27 | + repositories { |
| 28 | + add getProject().repositories.mavenLocal() |
| 29 | + } |
| 30 | + repositories.mavenDeployer { |
| 31 | + configuration = configurations.deployerJars |
| 32 | + |
| 33 | + if (project.hasProperty("filesmaven_url")) { |
| 34 | + logger.info('Publishing to files server') |
| 35 | + repository(url: project.filesmaven_url) { |
| 36 | + authentication(userName: project.filesmaven_username, password: project.filesmaven_key) |
| 37 | + } |
| 38 | + } else { |
| 39 | + logger.info('Publishing to repo folder') |
| 40 | + repository(url: 'file://localhost/' + project.file('repo').getAbsolutePath()) |
| 41 | + } |
| 42 | + |
| 43 | + pom { |
| 44 | + groupId = project.group |
| 45 | + version = project.version |
| 46 | + artifactId = project.archivesBaseName |
| 47 | + } |
| 48 | + pom.project { |
| 49 | + name project.archivesBaseName |
| 50 | + packaging 'jar' |
| 51 | + description 'An evil mod for Minecraft' |
| 52 | + url 'https://github.com/rubensworks/EvilCraft' |
| 53 | + |
| 54 | + scm { |
| 55 | + url 'https://github.com/rubensworks/EvilCraft' |
| 56 | + connection 'scm:git:git://github.com/rubensworks/EvilCraft.git' |
| 57 | + developerConnection 'scm:git:git@github.com:rubensworks/EvilCraft.git' |
| 58 | + } |
| 59 | + |
| 60 | + issueManagement { |
| 61 | + system 'github' |
| 62 | + url 'https://github.com/rubensworks/EvilCraft/issues' |
| 63 | + } |
| 64 | + |
| 65 | + developers { |
| 66 | + developer { |
| 67 | + id 'rubensworks' |
| 68 | + name 'rubensworks' |
| 69 | + roles { role 'developer' } |
| 70 | + } |
| 71 | + } |
| 72 | + } |
| 73 | + } |
| 74 | +} |
0 commit comments