aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build.gradle30
-rw-r--r--gradle/buildscript.gradle17
-rw-r--r--gradle/check.gradle36
-rw-r--r--gradle/convention.gradle74
-rw-r--r--gradle/github.gradle38
-rw-r--r--gradle/license.gradle9
-rw-r--r--gradle/nexus.gradle43
7 files changed, 23 insertions, 224 deletions
diff --git a/build.gradle b/build.gradle
index c69b70a..2bd4eb0 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,19 +1,29 @@
-// Establish version and status
-ext.githubProjectName = rootProject.name // Change if github project name is not the same as the root project's name
-group = "org.anarres"
-
buildscript {
apply from: file('gradle/buildscript.gradle'), to: buildscript
}
-apply from: file('gradle/convention.gradle')
-apply from: file('gradle/github.gradle')
-apply from: file('gradle/nexus.gradle')
-apply from: file('gradle/check.gradle')
-apply from: file('gradle/license.gradle')
+apply plugin: 'org.anarres.stdproject'
+stdproject {
+}
+
+ group = "org.anarres"
+
+ apply plugin: 'org.anarres.stdmodule'
+ stdmodule {
+ description "An embeddable C Preprocessor for the JVM."
+ author id: 'shevek', name: 'Shevek', email: '[email protected]'
+ license 'Apache-2.0'
+ }
+
+ sourceCompatibility = 1.5
+ animalsniffer {
+ signature = "org.codehaus.mojo.signature:java15:+@signature"
+ }
dependencies {
- // compile 'gnu.getopt:java-getopt:1.0.13'
+ compile 'com.google.code.findbugs:jsr305:2.0.2'
+ compile 'org.slf4j:slf4j-api:1.7.12'
+
compile 'net.sf.jopt-simple:jopt-simple:4.7'
compile 'org.apache.ant:ant:1.7.0'
compile 'com.github.zafarkhaja:java-semver:0.8.0'
diff --git a/gradle/buildscript.gradle b/gradle/buildscript.gradle
index 5b32f4e..c808309 100644
--- a/gradle/buildscript.gradle
+++ b/gradle/buildscript.gradle
@@ -1,22 +1,11 @@
// Executed in context of buildscript
repositories {
- // mavenLocal()
- // maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
+ mavenLocal()
mavenCentral()
jcenter()
+ // maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
}
dependencies {
- classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.10.0'
- // classpath 'com.mapvine:gradle-cobertura-plugin:0.1'
- classpath 'net.saliman:gradle-cobertura-plugin:2.2.5'
- // classpath 'gradle-release:gradle-release:1.1.5'
- classpath 'org.ajoberstar:gradle-git:1.0.0'
- // classpath 'net.ltgt.gradle:gradle-errorprone-plugin:0.0.5'
- classpath('com.netflix.nebula:gradle-info-plugin:2.2.0') {
- exclude group: 'com.perforce'
- }
- classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1'
- classpath 'be.insaneprogramming.gradle:animalsniffer-gradle-plugin:1.4.0'
- classpath 'com.github.ben-manes:gradle-versions-plugin:0.8'
+ classpath 'org.anarres.gradle:gradle-stdproject-plugin:1.0.2'
}
diff --git a/gradle/check.gradle b/gradle/check.gradle
deleted file mode 100644
index 50bceae..0000000
--- a/gradle/check.gradle
+++ /dev/null
@@ -1,36 +0,0 @@
- // Checkstyle
- // apply plugin: 'checkstyle'
- // checkstyle {
- // ignoreFailures = true
- // configFile = rootProject.file('codequality/checkstyle.xml')
- // }
-
- // FindBugs
- apply plugin: 'findbugs'
- findbugs {
- ignoreFailures = true
- }
- findbugsTest.enabled = false
-
- // PMD
- // apply plugin: 'pmd'
- // tasks.withType(Pmd) { reports.html.enabled true }
-
- apply plugin: 'cobertura'
- cobertura {
- coverageFormats = [ 'html', 'xml' ]
- }
- githubPages {
- pages {
- from(cobertura.coverageReportDir) {
- into "docs/cobertura"
- }
- }
- }
-
- apply plugin: "be.insaneprogramming.gradle.animalsniffer"
- animalsniffer {
- signature = "org.codehaus.mojo.signature:java15:+@signature"
- // ignores = ["my.package.name"]
- // annotations = [] // supported annotations to signal Animal Sniffer to ignore annotated elements
- }
diff --git a/gradle/convention.gradle b/gradle/convention.gradle
deleted file mode 100644
index abda03e..0000000
--- a/gradle/convention.gradle
+++ /dev/null
@@ -1,74 +0,0 @@
- apply plugin: 'java' // Plugin as major conventions
- // apply plugin: 'errorprone'
- apply plugin: 'info'
- apply plugin: 'com.github.ben-manes.versions'
-
- sourceCompatibility = 1.5
-
- // GRADLE-2087 workaround, perform after java plugin
- status = project.hasProperty('preferredStatus')?project.preferredStatus:(version.contains('SNAPSHOT')?'snapshot':'release')
-
- repositories {
- // mavenLocal()
- mavenCentral()
- // jcenter()
- }
-
- dependencies {
- compile 'com.google.code.findbugs:jsr305:2.0.2'
- compile 'org.slf4j:slf4j-api:1.7.12'
-
- testCompile 'junit:junit:4.12'
-
- testRuntime 'ch.qos.logback:logback-classic:1.1.3'
- }
-
- tasks.withType(JavaCompile) {
- // options.incremental = true
- }
-
- javadoc {
- if (!gradle.startParameter.offline)
- options.links "http://docs.oracle.com/javase/7/docs/api/",
- "http://docs.oracle.com/javaee/7/api/",
- "http://docs.guava-libraries.googlecode.com/git/javadoc/"
-
- if (false)
- if (JavaVersion.current().isJava8Compatible())
- options.addStringOption('Xdoclint:none', '-quiet')
- }
-
- test {
- systemProperty 'org.apache.commons.logging.Log', 'org.apache.commons.logging.impl.SimpleLog'
- systemProperty 'org.apache.commons.logging.simplelog.defaultlog', 'debug'
- systemProperty 'org.apache.commons.logging.diagnostics.dest', 'STDERR'
- systemProperty 'org.slf4j.simpleLogger.logFile', 'System.out'
- systemProperty 'org.slf4j.simpleLogger.defaultLogLevel', 'debug'
- systemProperty 'jna.nosys', 'true'
-
- testLogging {
- if (System.properties['test.single']) {
- // events "passed", "skipped", "failed"
- events "started", "passed", "skipped", "failed"
- showExceptions true
- exceptionFormat "full"
- showStandardStreams true
- } else {
- events "started", "skipped", "failed"
- }
-
- debug {
- events "started", "passed", "skipped", "failed", "standard_out", "standard_error"
- exceptionFormat "full"
- }
- }
- }
-
-apply plugin: 'build-announcements'
-apply plugin: 'build-dashboard'
-apply plugin: 'project-report'
-
-// Generate wrapper, which is distributed as part of source to alleviate the need of installing gradle
-wrapper {
- gradleVersion = '2.2.1'
-}
diff --git a/gradle/github.gradle b/gradle/github.gradle
deleted file mode 100644
index 4a6f935..0000000
--- a/gradle/github.gradle
+++ /dev/null
@@ -1,38 +0,0 @@
-apply plugin: 'org.ajoberstar.github-pages'
-
-def docTasks = [:]
-[Javadoc,ScalaDoc,Groovydoc].each{ Class docClass ->
- def allSources = allprojects.tasks*.withType(docClass).flatten()*.source
- if (allSources) {
- def shortName = docClass.simpleName.toLowerCase()
- def docTask = task "aggregate${shortName.capitalize()}"(type: docClass, description: "Aggregate subproject ${shortName}s") {
- source = allSources
- destinationDir = file("${project.buildDir}/docs/${shortName}")
- if (delegate.hasProperty('options')) { // Groovydoc has no options
- options.links "http://docs.oracle.com/javase/7/docs/api/",
- "http://docs.oracle.com/javaee/7/api/",
- "http://docs.guava-libraries.googlecode.com/git/javadoc/"
- options.linkSource true
- if (JavaVersion.current().isJava8Compatible())
- options.addStringOption('Xdoclint:none', '-quiet')
- }
- doFirst {
- def classpaths = allprojects.findAll { it.plugins.hasPlugin(JavaPlugin) }.collect { it.sourceSets.main.compileClasspath }
- classpath = files(classpaths)
- }
- }
- docTasks[shortName] = docTask
- publishGhPages.dependsOn(docTask)
- }
-}
-
-githubPages {
- repoUri = "[email protected]:shevek/${rootProject.githubProjectName}.git"
- pages {
- docTasks.each { shortName, docTask ->
- from(docTask.outputs.files) {
- into "docs/${shortName}"
- }
- }
- }
-}
diff --git a/gradle/license.gradle b/gradle/license.gradle
deleted file mode 100644
index 662bde1..0000000
--- a/gradle/license.gradle
+++ /dev/null
@@ -1,9 +0,0 @@
-allprojects {
- apply plugin: 'license' //nl.javadude.gradle.plugins.license.LicensePlugin
- license {
- header rootProject.file('codequality/HEADER')
- ext.year = Calendar.getInstance().get(Calendar.YEAR)
- skipExistingHeaders true
- ignoreFailures true
- }
-}
diff --git a/gradle/nexus.gradle b/gradle/nexus.gradle
deleted file mode 100644
index a51ec4b..0000000
--- a/gradle/nexus.gradle
+++ /dev/null
@@ -1,43 +0,0 @@
- apply plugin: 'com.bmuschko.nexus'
-
- project.afterEvaluate {
- uploadArchives {
- repositories {
- mavenDeployer {
- uniqueVersion = false
- }
- }
- }
- }
-
- modifyPom {
- // Closure to configure all the POM with extra info, common to all projects
- project {
- name "${project.name}"
- description "Java C Preprocessor"
- developers {
- developer {
- id 'shevek'
- name 'Shevek'
- }
- }
- licenses {
- license {
- name 'The Apache Software License, Version 2.0'
- url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
- distribution 'repo'
- }
- }
- url "https://github.com/shevek/${rootProject.githubProjectName}"
- scm {
- connection "scm:git:[email protected]:shevek/${rootProject.githubProjectName}.git"
- url "scm:git:[email protected]:shevek/${rootProject.githubProjectName}.git"
- developerConnection "scm:git:[email protected]:shevek/${rootProject.githubProjectName}.git"
- }
- issueManagement {
- system 'github'
- url "https://github.com/shevek/${rootProject.githubProjectName}/issues"
- }
- }
- }