Skip to content

Commit

Permalink
chore: GitHub Actions, Bintray publishing removed
Browse files Browse the repository at this point in the history
  • Loading branch information
augi committed Mar 22, 2021
1 parent 0b7fba9 commit 698e21a
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 71 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Build

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Check with Gradle
run: ./gradlew check --info
22 changes: 22 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Release
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Check with Gradle
run: ./gradlew check --info -Pversion=${{ github.event.release.tag_name }}
- name: Publish with Gradle to Gradle Plugins portal
run: ./gradlew publishPlugins --info -Pversion=${{ github.event.release.tag_name }}
env:
GRADLE_PORTAL_KEY: ${{ secrets.GRADLE_PORTAL_KEY }}
GRADLE_PORTAL_SECRET: ${{ secrets.GRADLE_PORTAL_SECRET }}
3 changes: 0 additions & 3 deletions .travis.yml

This file was deleted.

26 changes: 6 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Gradle WartRemover Plugin

[![Build Status](https://travis-ci.org/augi/gradle-wartremover.svg)](https://travis-ci.org/augi/gradle-wartremover) [ ![Download](https://api.bintray.com/packages/augi/maven/gradle-wartremover/images/download.svg) ](https://bintray.com/augi/maven/gradle-wartremover/_latestVersion)
# Gradle WartRemover Plugin [![Build](https://github.com/augi/gradle-wartremover/actions/workflows/build.yml/badge.svg)](https://github.com/augi/gradle-wartremover/actions/workflows/build.yml)

Gradle plugin to apply [WartRemover](http://www.wartremover.org), the Scala linting tool.

Expand All @@ -12,18 +10,12 @@ If you want to have different settings for tests then you can use the `test` blo
If you don't use `test` block then all the settings is applied to all the Scala code.

Usage
====================

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'cz.augi:gradle-wartremover:putCurrentVersionHere'
}
}
=====
The plugin is published to [Gradle Plugins portal](https://plugins.gradle.org/plugin/cz.augi.gradle.wartremover)

apply plugin: 'wartremover'
plugins {
id 'cz.augi.gradle.wartremover' version 'putCurrentVersionHere'
}

wartremover {
errorWarts.add('Product') // set of warts to use - violation causes error; default is empty set
Expand All @@ -37,9 +29,3 @@ Usage
classPaths.add(new File("path/to/yourTestWarts").toURI().toURL().toString()) // set of files or directories to be added to the classpath if using custom warts; default settings from the block above
}
}

The plugin can be also applied using [the new Gradle syntax](https://plugins.gradle.org/plugin/cz.augi.gradle.wartremover):

plugins {
id 'cz.augi.gradle.wartremover' version 'putCurrentVersionHere'
}
54 changes: 6 additions & 48 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,27 +1,15 @@
buildscript {
repositories {
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5'
classpath 'com.gradle.publish:plugin-publish-plugin:0.13.0'
}
plugins {
id 'java-gradle-plugin'
id 'com.gradle.plugin-publish' version '0.13.0'
}

apply plugin: 'groovy'

group 'cz.augi'
version = version == 'unspecified' ? 'DEVELOPER-SNAPSHOT' : version

apply plugin: 'groovy'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'com.jfrog.bintray'
apply plugin: "com.gradle.plugin-publish"

repositories {
jcenter()
mavenCentral()
}

dependencies {
Expand All @@ -37,36 +25,6 @@ dependencies {

sourceCompatibility = JavaVersion.VERSION_1_8

task sourcesJar(type: Jar) {
from sourceSets.main.allSource
archiveClassifier = 'sources'
}

artifacts {
archives sourcesJar
}

bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_KEY')
configurations = ['archives']
publish = true
pkg {
repo = 'maven'
name = 'gradle-wartremover'
desc = 'Gradle plugin to apply WartRemover (Scala linting tool)'
licenses = ['MIT']
vcsUrl = 'https://github.com/augi/gradle-wartremover.git'
websiteUrl = 'https://github.com/augi/gradle-wartremover'
issueTrackerUrl = 'https://github.com/augi/gradle-wartremover/issues'
labels = ['gradle', 'scala', 'wartremover']
version {
name = project.version
vcsTag = project.version
}
}
}

project.ext.set('gradle.publish.key', System.getenv('GRADLE_PORTAL_KEY'))
project.ext.set('gradle.publish.secret', System.getenv('GRADLE_PORTAL_SECRET'))
pluginBundle {
Expand Down

0 comments on commit 698e21a

Please sign in to comment.