Skip to content

Commit 9c22297

Browse files
authored
Drop CircleCI and grab GitHub Actions (#7)
2 parents 0c53a99 + 57fe1fb commit 9c22297

File tree

10 files changed

+170
-115
lines changed

10 files changed

+170
-115
lines changed

.circleci/config.yml

Lines changed: 0 additions & 89 deletions
This file was deleted.

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* text eol=lf
2+
*.jar binary

.github/workflows/changelog-print.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: changelogPrint
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
name: changelogPrint
11+
steps:
12+
- uses: actions/checkout@v3
13+
- name: jdk 11
14+
uses: actions/setup-java@v3
15+
with:
16+
java-version: 11
17+
distribution: 'temurin'
18+
- name: gradle caching
19+
uses: gradle/gradle-build-action@v2
20+
with:
21+
gradle-home-cache-cleanup: true
22+
- run: ./gradlew changelogPrint

.github/workflows/ci.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
on:
2+
pull_request:
3+
push:
4+
branches: [main]
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}
7+
cancel-in-progress: true
8+
jobs:
9+
build:
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
jre: [17]
14+
os: [ubuntu-latest, windows-latest]
15+
include:
16+
- jre: 11
17+
os: ubuntu-latest
18+
runs-on: ${{ matrix.os }}
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v3
22+
- name: Install JDK ${{ matrix.jre }}
23+
uses: actions/setup-java@v3
24+
with:
25+
distribution: "temurin"
26+
java-version: ${{ matrix.jre }}
27+
- name: gradle caching
28+
uses: gradle/gradle-build-action@v2
29+
with:
30+
gradle-home-cache-cleanup: true
31+
- name: git fetch origin main
32+
run: git fetch origin main
33+
- name: gradlew build
34+
run: ./gradlew build
35+
- name: junit result
36+
uses: mikepenz/action-junit-report@v3
37+
if: always() # always run even if the previous step fails
38+
with:
39+
check_name: JUnit ${{ matrix.jre }} ${{ matrix.os }}
40+
report_paths: '*/build/test-results/*/TEST-*.xml'

.github/workflows/deploy.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# GH_TOKEN
2+
# NEXUS_USER
3+
# NEXUS_PASS64 (base64 NOTE: `base64` and `openssl base64` failed, had to use Java
4+
# byte[] data = "{{password}}".getBytes(StandardCharsets.UTF_8);
5+
# String encoded = new String(Base64.getEncoder().encode(data), StandardCharsets.UTF_8);
6+
# System.out.println(encoded);
7+
# GPG_PASSPHRASE
8+
# GPG_KEY64 (base64)
9+
# gpg --export-secret-keys --armor KEY_ID | openssl base64 | pbcopy
10+
# GRADLE_KEY
11+
# GRADLE_SECRET
12+
13+
name: deploy
14+
on:
15+
workflow_dispatch:
16+
inputs:
17+
to_publish:
18+
description: 'What to publish'
19+
required: true
20+
default: 'all'
21+
type: choice
22+
options:
23+
- all
24+
25+
jobs:
26+
build:
27+
runs-on: ubuntu-latest
28+
name: deploy
29+
env:
30+
gh_token: ${{ secrets.GH_TOKEN }}
31+
ORG_GRADLE_PROJECT_nexus_user: ${{ secrets.NEXUS_USER }}
32+
ORG_GRADLE_PROJECT_nexus_pass64: ${{ secrets.NEXUS_PASS64 }}
33+
ORG_GRADLE_PROJECT_gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
34+
ORG_GRADLE_PROJECT_gpg_key64: ${{ secrets.GPG_KEY64 }}
35+
steps:
36+
- uses: actions/checkout@v3
37+
- name: jdk 11
38+
uses: actions/setup-java@v3
39+
with:
40+
java-version: 11
41+
distribution: 'temurin'
42+
- name: gradle caching
43+
uses: gradle/gradle-build-action@v2
44+
with:
45+
gradle-home-cache-cleanup: true
46+
- name: git fetch origin main
47+
run: git fetch origin main
48+
- name: publish all
49+
if: "${{ github.event.inputs.to_publish == 'all' }}"
50+
run: |
51+
./gradlew :changelogPush -Prelease=true -Penable_publishing=true -Pgradle.publish.key=${{ secrets.GRADLE_KEY }} -Pgradle.publish.secret=${{ secrets.GRADLE_SECRET }} --stacktrace --warning-mode all
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: "Validate Gradle Wrapper"
2+
on:
3+
push:
4+
paths:
5+
- 'gradlew'
6+
- 'gradlew.bat'
7+
- 'gradle/wrapper/'
8+
pull_request:
9+
paths:
10+
- 'gradlew'
11+
- 'gradlew.bat'
12+
- 'gradle/wrapper/'
13+
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
validation:
19+
name: "Validation"
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v3
23+
- uses: gradle/wrapper-validation-action@v1

atplug-plugin-gradle/src/test/java/com/diffplug/atplug/tooling/gradle/PlugPluginTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test
99
class PlugPluginTest : GradleIntegrationHarness() {
1010
@Test
1111
fun test() {
12-
val runtimeJar = PlugGeneratorTest.findRuntimeJar().canonicalPath
12+
val runtimeJar = PlugGeneratorTest.findRuntimeJar().canonicalPath.replace('\\', '/')
1313
setFile("build.gradle")
1414
.toContent(
1515
"""

build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ apply from: 干.file('base/sonatype.gradle')
1313

1414
String VER_JUNIT_JUPITER = '5.9.1'
1515
subprojects {
16-
apply from: 干.file('base/java8.gradle')
16+
apply from: 干.file('base/java.gradle')
1717
apply from: 干.file('base/kotlin.gradle')
1818
apply from: 干.file('spotless/java.gradle')
1919
apply plugin: 'java-library'
@@ -24,8 +24,6 @@ subprojects {
2424
testImplementation "org.junit.jupiter:junit-jupiter-api:${VER_JUNIT_JUPITER}"
2525
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${VER_JUNIT_JUPITER}"
2626
}
27-
28-
ext.kotlin_jvmTarget = '1.8'
2927
if (it.name == 'atplug-runtime') {
3028
ext.maven_name = 'AtPlug runtime'
3129
apply plugin: 'kotlinx-serialization'

gradle.properties

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,8 @@ plugin_atplug_impl=com.diffplug.atplug.tooling.gradle.PlugPlugin
77
plugin_atplug_name=AtPlug Gradle Plugin
88
plugin_atplug_desc=Generates plugin metadata for AtPlug
99

10+
ver_java=8
11+
kotlin_jvmTarget=1.8
12+
1013
maven_group=com.diffplug.atplug
11-
javadoc_links=
14+
javadoc_links=

settings.gradle

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,37 @@
11
pluginManagement {
2-
plugins {
3-
id 'com.diffplug.blowdryer' version '1.6.0'
4-
id 'com.diffplug.blowdryerSetup' version '1.6.0'
5-
id 'com.diffplug.configuration-cache-for-platform-specific-build' version '3.40.0'
6-
id 'com.diffplug.spotless' version '6.12.0'
7-
id 'com.diffplug.spotless-changelog' version '2.4.1'
8-
id 'org.jetbrains.dokka' version '1.7.20'
9-
id 'org.jetbrains.kotlin.jvm' version '1.8.0'
10-
id 'org.jetbrains.kotlin.plugin.serialization' version '1.8.0'
11-
id 'com.gradle.plugin-publish' version '1.1.0'
12-
id 'io.github.gradle-nexus.publish-plugin' version '1.1.0'
2+
repositories {
3+
mavenCentral()
4+
gradlePluginPortal()
135
}
146
}
157
plugins {
16-
id 'com.diffplug.blowdryerSetup'
17-
id 'com.diffplug.configuration-cache-for-platform-specific-build' apply false
18-
id 'com.diffplug.spotless' apply false
19-
id 'com.diffplug.spotless-changelog' apply false
20-
id 'org.jetbrains.dokka' apply false
21-
id 'org.jetbrains.kotlin.jvm' apply false
22-
id 'org.jetbrains.kotlin.plugin.serialization' apply false
23-
id 'com.gradle.plugin-publish' apply false
24-
id 'io.github.gradle-nexus.publish-plugin' apply false
8+
// https://github.com/diffplug/blowdryer/blob/main/CHANGELOG.md
9+
id 'com.diffplug.blowdryerSetup' version '1.7.0'
10+
// https://github.com/diffplug/spotless/blob/main/plugin-gradle/CHANGES.md
11+
id 'com.diffplug.spotless' version '6.14.0' apply false
12+
// https://github.com/diffplug/spotless-changelog/blob/main/CHANGELOG.md
13+
id 'com.diffplug.spotless-changelog' version '2.4.1' apply false
14+
// https://plugins.gradle.org/plugin/com.gradle.plugin-publish
15+
id 'com.gradle.plugin-publish' version '1.1.0' apply false
16+
// https://github.com/equodev/equo-ide/blob/main/plugin-gradle/CHANGELOG.md
17+
id 'dev.equo.ide' version '0.12.1' apply false
18+
// https://github.com/gradle-nexus/publish-plugin/releases
19+
id 'io.github.gradle-nexus.publish-plugin' version '1.1.0' apply false
20+
// https://plugins.gradle.org/plugin/org.jetbrains.dokka
21+
id 'org.jetbrains.dokka' version '1.7.20' apply false
22+
// https://plugins.gradle.org/plugin/org.jetbrains.kotlin.jvm
23+
id 'org.jetbrains.kotlin.jvm' version '1.8.0' apply false
24+
// https://plugins.gradle.org/plugin/org.jetbrains.kotlin.plugin.serialization
25+
id 'org.jetbrains.kotlin.plugin.serialization' version '1.8.0' apply false
2526
}
2627

2728
blowdryerSetup {
28-
github 'diffplug/blowdryer-diffplug', 'tag', '6.0.1'
29+
github 'diffplug/blowdryer-diffplug', 'tag', '7.0.0'
2930
//devLocal '../blowdryer-diffplug'
31+
setPluginsBlockTo {
32+
it.file 'plugin.versions'
33+
it.file 'plugin-kotlin.versions'
34+
}
3035
}
3136

3237
include 'atplug-runtime'

0 commit comments

Comments
 (0)