Skip to content

Commit

Permalink
Merge from staging repo to release v4.0.0 (#191)
Browse files Browse the repository at this point in the history
Replaced legacy implementation with new one implemented from scratch.

BREAKING CHANGE: This version drop support for `emacs` reporting and `sourceSets` property in extension. It also changed the name of package, to avoid mixing with legacy implementation.
  • Loading branch information
KengoTODA authored Mar 3, 2020
1 parent 3d91ea9 commit 3e88cd4
Show file tree
Hide file tree
Showing 106 changed files with 12,091 additions and 3,364 deletions.
20 changes: 20 additions & 0 deletions .githooks/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
applypatch-msg
commit-msg
post-applypatch
post-commit
post-merge
post-receive
post-rewrite
post-update
pre-applypatch
pre-auto-gc
pre-commit
pre-merge-commit
pre-push
pre-rebase
pre-receive
prepare-commit-msg
push-to-checkout
sendemail-validate
update
husky.*
23 changes: 23 additions & 0 deletions .githooks/post-checkout
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/sh

# This script installs the development toolchain runs on node.js (commitlint, husky, prettier, etc.).
# It helps Java engineers to set up full development toolchain seamless.
#
# Gradle plugin (ghooks.gradle) will install this git-hook script.
# We use `post-checkout` because `pre-commit` is used by husky to lint code, and
# `post-clone` is still unofficial so we have no other hook runs before the commit.

set -e

if [ ! -d "node_modules" ]
then
if [ -x "$(command -v yarn)" ]
then
echo "🔍🐛 node_modules directory not found, running `yarn install` to install the dev toolchain..."
yarn install
echo "🔍🐛 The dev toolchain has been installed."
else
echo "🔍🐛 The yarn command not found. Please install it to keep your commit clean:"
echo "🔍🐛 https://yarnpkg.com/en/docs/install"
fi
fi
40 changes: 40 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Contributing Guideline

## How to hack this project

Make sure you have Java 11+, Node.js 12+ and NPM on your `PATH`.

Before you start hacking, run `npm install` once to install development toolchain
to follow [the Conventional Commits](https://conventionalcommits.org/).

To build the implementation and test, run `./gradlew` then it runs all necessary formatter, compile and test.

## How to use latest plugin in your project

To test your changes, you need to build and install the plugin by your own.

To install the plugin into your Maven Local Repository, add `apply plugin: 'maven-publish'` to `build.gradle` and run `./gradlew publishToMavenLocal`. Then you can use the installed plugin like below:

```groovy
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
mavenLocal()
}
dependencies {
classpath "com.github.spotbugs.snom:spotbugs-gradle-plugin:(YOUR_VERSION)"
}
}
apply plugin: "com.github.spotbugs.snom"
```

## Before reporting a problem

When you find problems and want to share with the community, consider to add some JUnit test cases to reproduce.
Just two steps to follow:

1. Create a [minimum and complete](http://stackoverflow.com/help/mcve) project, and reproduce it by [functional testing](https://guides.gradle.org/testing-gradle-plugins/). The test code is located in `src/functionalTest` directory.
2. Confirm that `./gradlew clean build` fails by the newly added test case.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [KengoTODA]
6 changes: 6 additions & 0 deletions .github/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
minApprovals:
NONE: 0
requiredLabels:
- dependencies
updateBranch: true
mergeMethod: rebase
85 changes: 85 additions & 0 deletions .github/issuehunt-shield-v1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
63 changes: 63 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Java CI

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
gradle: ['5.6', '6.0', '6.1', '6.2']
steps:
- uses: actions/checkout@722adc6
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@081536e
with:
java-version: 11
- name: Set up Node.js 12
uses: actions/setup-node@8de2f9f
with:
node-version: 12
- uses: actions/cache@cffae95
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1
- name: Build with Gradle
run: ./gradlew build --no-daemon -Dsnom.test.functional.gradle=${{ matrix.gradle }}
- name: Run Semantic Release
run: |
echo "gradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }}" > ~/.gradle/gradle.properties
echo "gradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }}" >> ~/.gradle/gradle.properties
rm -rf build/libs/*.jar
npm ci
npm run semantic-release
if: matrix.gradle == '6.0'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run SonarQube Scanner
run: |
if [ "$SONAR_LOGIN" != "" ]; then
./gradlew sonarqube -Dsonar.login=$SONAR_LOGIN --no-daemon
fi
if: matrix.gradle == '6.0'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_LOGIN: ${{ secrets.SONAR_LOGIN }}
- uses: actions/upload-artifact@3446296
if: always()
with:
name: reports
path: build/reports
31 changes: 31 additions & 0 deletions .github/workflows/javadoc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Javadoc
on:
push:
branches:
- master
jobs:
javadoc:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@af513c7
- name: Set up JDK 11
uses: actions/setup-java@081536e
with:
java-version: 11
- name: Set up Node.js 12
uses: actions/setup-node@8de2f9f
with:
node-version: 12
- name: Generate Groovydoc
run: ./gradlew groovydoc
- name: Prepare to Deploy
run: |
npm ci
rm -f .git/hooks/commit-msg
- name: Deploy
uses: JamesIves/github-pages-deploy-action@c74c1d2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: build/docs/groovydoc/
Loading

0 comments on commit 3e88cd4

Please sign in to comment.