|
| 1 | +buildscript { |
| 2 | + repositories { |
| 3 | + jcenter() |
| 4 | + maven { |
| 5 | + url "https://plugins.gradle.org/m2/" |
| 6 | + } |
| 7 | + } |
| 8 | + dependencies { |
| 9 | + classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1' |
| 10 | + classpath 'net.researchgate:gradle-release:2.2.2' |
| 11 | + classpath "gradle.plugin.se.bjurr.gitchangelog:git-changelog-gradle-plugin:1.36" |
| 12 | + } |
| 13 | +} |
| 14 | + |
| 15 | +apply plugin: 'java' |
| 16 | +apply plugin: 'maven' |
| 17 | +apply plugin: 'eclipse' |
| 18 | +apply plugin: 'signing' |
| 19 | +apply plugin: 'com.bmuschko.nexus' |
| 20 | +apply plugin: 'net.researchgate.release' |
| 21 | +apply plugin: "se.bjurr.gitchangelog.git-changelog-gradle-plugin" |
| 22 | + |
| 23 | +task gitChangelogTask(type: se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask) { |
| 24 | + filePath = "CHANGELOG.md"; |
| 25 | + templateContent = """ |
| 26 | +# Changelog |
| 27 | +{{#tags}} |
| 28 | +## {{name}} |
| 29 | + {{#issues}} |
| 30 | + {{#hasIssue}} |
| 31 | + {{#hasLink}} |
| 32 | +### {{name}} [{{issue}}]({{link}}) {{title}} |
| 33 | + {{/hasLink}} |
| 34 | + {{^hasLink}} |
| 35 | +### {{name}} {{issue}} {{title}} |
| 36 | + {{/hasLink}} |
| 37 | + {{/hasIssue}} |
| 38 | + {{^hasIssue}} |
| 39 | +### {{name}} |
| 40 | + {{/hasIssue}} |
| 41 | + {{#commits}} |
| 42 | +**{{{messageTitle}}}** |
| 43 | +{{#messageBodyItems}} |
| 44 | + * {{.}} |
| 45 | +{{/messageBodyItems}} |
| 46 | +[{{hash}}](https://github.com/tomasbjerre/violation-comments-to-bitbucket-server-lib/commit/{{hash}}) {{authorName}} *{{commitTime}}* |
| 47 | + {{/commits}} |
| 48 | + {{/issues}} |
| 49 | +{{/tags}} |
| 50 | + """; |
| 51 | + removeIssueFromMessage = true |
| 52 | +} |
| 53 | + |
| 54 | +group = 'se.bjurr.violations' |
| 55 | + |
| 56 | +sourceCompatibility = 1.7 |
| 57 | +targetCompatibility = 1.7 |
| 58 | + |
| 59 | +repositories { |
| 60 | + jcenter() |
| 61 | + mavenLocal() |
| 62 | + mavenCentral() |
| 63 | +} |
| 64 | + |
| 65 | +dependencies { |
| 66 | + compile 'se.bjurr.violations:violation-comments-lib:1.10' |
| 67 | + compile 'com.jayway.jsonpath:json-path:2.0.0' |
| 68 | + |
| 69 | + testCompile 'junit:junit:4.12' |
| 70 | + testCompile 'org.assertj:assertj-core:2.3.0' |
| 71 | + testCompile ('org.assertj:assertj-core:2.5.0') |
| 72 | +} |
| 73 | + |
| 74 | +eclipse { |
| 75 | + classpath { |
| 76 | + downloadSources = true |
| 77 | + downloadJavadoc = true |
| 78 | + } |
| 79 | +} |
| 80 | + |
| 81 | +sourceSets { |
| 82 | + main.java.srcDirs = ['src/main/java' ] |
| 83 | + test.java.srcDirs = ['src/test/java' ] |
| 84 | +} |
| 85 | + |
| 86 | +if (JavaVersion.current().isJava8Compatible()) { |
| 87 | + allprojects { |
| 88 | + tasks.withType(Javadoc) { |
| 89 | + options.addStringOption('Xdoclint:none', '-quiet') |
| 90 | + } |
| 91 | + } |
| 92 | +} |
| 93 | + |
| 94 | +modifyPom { |
| 95 | + project { |
| 96 | + name 'Violation Comments to Bitbucket Server Lib' |
| 97 | + description 'Library that adds violation comments from static code analysis to Bitbucket Server.' |
| 98 | + url 'https://github.com/tomasbjerre/violation-comments-to-bitbucket-server-lib' |
| 99 | + inceptionYear '2016' |
| 100 | + scm { |
| 101 | + url 'https://github.com/tomasbjerre/violation-comments-to-bitbucket-server-lib' |
| 102 | + connection 'scm:https://[email protected]/tomasbjerre/violation-comments-to-bitbucket-server-lib.git' |
| 103 | + developerConnection 'scm:git://github.com/tomasbjerre/violation-comments-to-bitbucket-server-lib.git' |
| 104 | + } |
| 105 | + |
| 106 | + licenses { |
| 107 | + license { |
| 108 | + name 'The Apache Software License, Version 2.0' |
| 109 | + url 'http://www.apache.org/licenses/LICENSE-2.0.txt' |
| 110 | + distribution 'repo' |
| 111 | + } |
| 112 | + } |
| 113 | + |
| 114 | + developers { |
| 115 | + developer { |
| 116 | + id 'tomasbjerre' |
| 117 | + name 'Tomas Bjerre' |
| 118 | + |
| 119 | + } |
| 120 | + } |
| 121 | + } |
| 122 | +} |
| 123 | + |
| 124 | +extraArchive { |
| 125 | + sources = true |
| 126 | + tests = true |
| 127 | + javadoc = true |
| 128 | +} |
| 129 | + |
| 130 | +afterReleaseBuild.dependsOn { |
| 131 | + [install, uploadArchives] |
| 132 | +} |
0 commit comments