forked from alenkacz/gradle-scalafmt
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
150 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
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@v2 | ||
with: | ||
java-version: 8 | ||
distribution: 'adopt' | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Check with Gradle | ||
run: ./gradlew check --info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
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@v2 | ||
with: | ||
java-version: 8 | ||
distribution: 'adopt' | ||
- 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 publishToSonatype closeAndReleaseSonatypeStagingRepository publishPlugins --info -Pversion=${{ github.event.release.tag_name }} | ||
env: | ||
GRADLE_PORTAL_KEY: ${{ secrets.GRADLE_PORTAL_KEY }} | ||
GRADLE_PORTAL_SECRET: ${{ secrets.GRADLE_PORTAL_SECRET }} | ||
SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | ||
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | ||
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }} | ||
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,88 +1,104 @@ | ||
buildscript { | ||
repositories { | ||
jcenter() | ||
maven { | ||
url "https://plugins.gradle.org/m2/" | ||
} | ||
} | ||
dependencies { | ||
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4' | ||
classpath 'com.gradle.publish:plugin-publish-plugin:0.14.0' | ||
} | ||
} | ||
|
||
plugins { | ||
id 'net.researchgate.release' version '2.8.1' | ||
id 'groovy' | ||
id 'maven-publish' | ||
id 'java-gradle-plugin' | ||
id 'signing' | ||
id 'io.github.gradle-nexus.publish-plugin' version '1.0.0' | ||
id 'com.gradle.plugin-publish' version '0.14.0' | ||
} | ||
|
||
group 'cz.alenkacz' | ||
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 { | ||
compile gradleApi() | ||
compile 'org.scalameta:scalafmt-dynamic_2.12:2.7.5' | ||
compile 'org.scala-lang.modules:scala-xml_2.12:1.3.0' | ||
testCompile 'junit:junit:4.13' | ||
testCompile gradleTestKit() | ||
testCompile ('org.spockframework:spock-core:1.3-groovy-2.4') { | ||
api gradleApi() | ||
api 'org.scalameta:scalafmt-dynamic_2.12:2.7.5' | ||
api 'org.scala-lang.modules:scala-xml_2.12:1.3.0' | ||
|
||
testImplementation 'junit:junit:4.13.2' | ||
testImplementation gradleTestKit() | ||
testImplementation ('org.spockframework:spock-core:2.0-M5-groovy-3.0') { | ||
exclude group:'org.codehaus.groovy' | ||
} | ||
} | ||
|
||
test { | ||
useJUnitPlatform() | ||
testLogging { | ||
events 'failed' | ||
exceptionFormat 'full' | ||
} | ||
} | ||
|
||
task sourcesJar(type: Jar) { | ||
from sourceSets.main.allSource | ||
archiveClassifier = 'sources' | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
|
||
project.ext.set('gradle.publish.key', System.getenv('GRADLE_PORTAL_KEY')) | ||
project.ext.set('gradle.publish.secret', System.getenv('GRADLE_PORTAL_SECRET')) | ||
pluginBundle { | ||
website = 'https://github.com/augi/gradle-scalafmt' | ||
vcsUrl = 'https://github.com/augi/gradle-scalafmt' | ||
description = 'Gradle plugin to apply scalafmt (Scala linting tool)' | ||
tags = ['gradle', 'scala', 'scalafmt'] | ||
|
||
plugins { | ||
wartremoverPlugin { | ||
id = 'cz.augi.gradle.scalafmt' | ||
displayName = 'Gradle scalafmt plugin' | ||
} | ||
} | ||
} | ||
|
||
artifacts { | ||
archives sourcesJar | ||
|
||
java { | ||
withJavadocJar() | ||
withSourcesJar() | ||
} | ||
|
||
bintray { | ||
user = System.getenv('BINTRAY_USER') | ||
key = System.getenv('BINTRAY_KEY') | ||
configurations = ['archives'] | ||
publish = true | ||
pkg { | ||
repo = 'maven' | ||
name = 'gradle-scalafmt' | ||
desc = 'Gradle plugin that can run scalafmt as a part of your build.' | ||
licenses = ['MIT'] | ||
vcsUrl = 'https://github.com/alenkacz/gradle-scalafmt.git' | ||
websiteUrl = 'https://github.com/alenkacz/gradle-scalafmt' | ||
issueTrackerUrl = 'https://github.com/alenkacz/gradle-scalafmt/issues' | ||
labels = ['scala', 'scalafmt', 'formatting'] | ||
version { | ||
name = project.version | ||
vcsTag = project.version | ||
afterEvaluate { | ||
publishing.publications.forEach { | ||
it.pom { | ||
name = 'Gradle scalafmt Plugin' | ||
description = 'Gradle plugin to apply scalafmt (Scala linting tool)' | ||
url = 'https://github.com/augi/gradle-scalafmt' | ||
licenses { | ||
license { | ||
name = 'The MIT License' | ||
url = 'http://www.opensource.org/licenses/mit-license.php' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'augi' | ||
name = 'Michal Augustýn' | ||
email = '[email protected]' | ||
} | ||
} | ||
scm { | ||
connection = 'scm:git:git://github.com/augi/gradle-scalafmt.git' | ||
developerConnection = 'scm:git:ssh://github.com/augi/gradle-scalafmt.git' | ||
url = 'https://github.com/augi/gradle-scalafmt' | ||
} | ||
} | ||
} | ||
} | ||
|
||
project.ext.set('gradle.publish.key', System.getenv('GRADLE_PORTAL_KEY')) | ||
project.ext.set('gradle.publish.secret', System.getenv('GRADLE_PORTAL_SECRET')) | ||
pluginBundle { | ||
website = 'https://github.com/alenkacz/gradle-scalafmt' | ||
vcsUrl = 'https://github.com/alenkacz/gradle-scalafmt' | ||
description = 'Gradle plugin that can run scalafmt as a part of your build.' | ||
tags = ['scalafmt', 'scala', "formatting"] | ||
signing { | ||
String base64Key = System.getenv('SIGNING_KEY') | ||
if (base64Key) { | ||
useInMemoryPgpKeys(new String(Base64.decoder.decode(base64Key)), System.getenv('SIGNING_PASSWORD')) | ||
sign publishing.publications | ||
} | ||
} | ||
|
||
plugins { | ||
scalafmtPlugin { | ||
id = 'cz.alenkacz.gradle.scalafmt' | ||
displayName = 'Gradle Scalafmt plugin' | ||
nexusPublishing { | ||
repositories { | ||
sonatype { | ||
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/")) | ||
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"extends": [ | ||
"config:base" | ||
] | ||
} |
2 changes: 1 addition & 1 deletion
2
...kacz/gradle/scalafmt/ConfigFactory.groovy → ...augi/gradle/scalafmt/ConfigFactory.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...cz/gradle/scalafmt/PluginExtension.groovy → ...gi/gradle/scalafmt/PluginExtension.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../gradle/scalafmt/ScalafmtCheckTask.groovy → .../gradle/scalafmt/ScalafmtCheckTask.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...gradle/scalafmt/ScalafmtFormatBase.groovy → ...gradle/scalafmt/ScalafmtFormatBase.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...e/scalafmt/ScalafmtFormatException.groovy → ...e/scalafmt/ScalafmtFormatException.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package cz.alenkacz.gradle.scalafmt | ||
package cz.augi.gradle.scalafmt | ||
|
||
import org.gradle.api.GradleException | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...acz/gradle/scalafmt/ScalafmtPlugin.groovy → ...ugi/gradle/scalafmt/ScalafmtPlugin.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...nkacz/gradle/scalafmt/ScalafmtTask.groovy → .../augi/gradle/scalafmt/ScalafmtTask.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/resources/META-INF/gradle-plugins/cz.alenkacz.gradle.scalafmt.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
implementation-class=cz.alenkacz.gradle.scalafmt.ScalafmtPlugin | ||
implementation-class=cz.augi.gradle.scalafmt.ScalafmtPlugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
implementation-class=cz.alenkacz.gradle.scalafmt.ScalafmtPlugin | ||
implementation-class=cz.augi.gradle.scalafmt.ScalafmtPlugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...gradle/scalafmt/ScalafmtPluginTest.groovy → ...gradle/scalafmt/ScalafmtPluginTest.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...z/gradle/scalafmt/ScalafmtTaskTest.groovy → ...i/gradle/scalafmt/ScalafmtTaskTest.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...enkacz/gradle/scalafmt/TestProject.groovy → ...z/augi/gradle/scalafmt/TestProject.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters