Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 0 additions & 89 deletions .circleci/config.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* text eol=lf
*.jar binary
22 changes: 22 additions & 0 deletions .github/workflows/changelog-print.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: changelogPrint

on:
push:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest
name: changelogPrint
steps:
- uses: actions/checkout@v3
- name: jdk 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'temurin'
- name: gradle caching
uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-cleanup: true
- run: ./gradlew changelogPrint
40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
on:
pull_request:
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
fail-fast: false
matrix:
jre: [17]
os: [ubuntu-latest, windows-latest]
include:
- jre: 11
os: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install JDK ${{ matrix.jre }}
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: ${{ matrix.jre }}
- name: gradle caching
uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-cleanup: true
- name: git fetch origin main
run: git fetch origin main
- name: gradlew build
run: ./gradlew build
- name: junit result
uses: mikepenz/action-junit-report@v3
if: always() # always run even if the previous step fails
with:
check_name: JUnit ${{ matrix.jre }} ${{ matrix.os }}
report_paths: '*/build/test-results/*/TEST-*.xml'
51 changes: 51 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# GH_TOKEN
# NEXUS_USER
# NEXUS_PASS64 (base64 NOTE: `base64` and `openssl base64` failed, had to use Java
# byte[] data = "{{password}}".getBytes(StandardCharsets.UTF_8);
# String encoded = new String(Base64.getEncoder().encode(data), StandardCharsets.UTF_8);
# System.out.println(encoded);
# GPG_PASSPHRASE
# GPG_KEY64 (base64)
# gpg --export-secret-keys --armor KEY_ID | openssl base64 | pbcopy
# GRADLE_KEY
# GRADLE_SECRET

name: deploy
on:
workflow_dispatch:
inputs:
to_publish:
description: 'What to publish'
required: true
default: 'all'
type: choice
options:
- all

jobs:
build:
runs-on: ubuntu-latest
name: deploy
env:
gh_token: ${{ secrets.GH_TOKEN }}
ORG_GRADLE_PROJECT_nexus_user: ${{ secrets.NEXUS_USER }}
ORG_GRADLE_PROJECT_nexus_pass64: ${{ secrets.NEXUS_PASS64 }}
ORG_GRADLE_PROJECT_gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
ORG_GRADLE_PROJECT_gpg_key64: ${{ secrets.GPG_KEY64 }}
steps:
- uses: actions/checkout@v3
- name: jdk 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'temurin'
- name: gradle caching
uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-cleanup: true
- name: git fetch origin main
run: git fetch origin main
- name: publish all
if: "${{ github.event.inputs.to_publish == 'all' }}"
run: |
./gradlew :changelogPush -Prelease=true -Penable_publishing=true -Pgradle.publish.key=${{ secrets.GRADLE_KEY }} -Pgradle.publish.secret=${{ secrets.GRADLE_SECRET }} --stacktrace --warning-mode all
23 changes: 23 additions & 0 deletions .github/workflows/gradle-wrapper-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "Validate Gradle Wrapper"
on:
push:
paths:
- 'gradlew'
- 'gradlew.bat'
- 'gradle/wrapper/'
pull_request:
paths:
- 'gradlew'
- 'gradlew.bat'
- 'gradle/wrapper/'

permissions:
contents: read

jobs:
validation:
name: "Validation"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test
class PlugPluginTest : GradleIntegrationHarness() {
@Test
fun test() {
val runtimeJar = PlugGeneratorTest.findRuntimeJar().canonicalPath
val runtimeJar = PlugGeneratorTest.findRuntimeJar().canonicalPath.replace('\\', '/')
setFile("build.gradle")
.toContent(
"""
Expand Down
4 changes: 1 addition & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ apply from: 干.file('base/sonatype.gradle')

String VER_JUNIT_JUPITER = '5.9.1'
subprojects {
apply from: 干.file('base/java8.gradle')
apply from: 干.file('base/java.gradle')
apply from: 干.file('base/kotlin.gradle')
apply from: 干.file('spotless/java.gradle')
apply plugin: 'java-library'
Expand All @@ -24,8 +24,6 @@ subprojects {
testImplementation "org.junit.jupiter:junit-jupiter-api:${VER_JUNIT_JUPITER}"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${VER_JUNIT_JUPITER}"
}

ext.kotlin_jvmTarget = '1.8'
if (it.name == 'atplug-runtime') {
ext.maven_name = 'AtPlug runtime'
apply plugin: 'kotlinx-serialization'
Expand Down
5 changes: 4 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@ plugin_atplug_impl=com.diffplug.atplug.tooling.gradle.PlugPlugin
plugin_atplug_name=AtPlug Gradle Plugin
plugin_atplug_desc=Generates plugin metadata for AtPlug

ver_java=8
kotlin_jvmTarget=1.8

maven_group=com.diffplug.atplug
javadoc_links=
javadoc_links=
47 changes: 26 additions & 21 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,32 +1,37 @@
pluginManagement {
plugins {
id 'com.diffplug.blowdryer' version '1.6.0'
id 'com.diffplug.blowdryerSetup' version '1.6.0'
id 'com.diffplug.configuration-cache-for-platform-specific-build' version '3.40.0'
id 'com.diffplug.spotless' version '6.12.0'
id 'com.diffplug.spotless-changelog' version '2.4.1'
id 'org.jetbrains.dokka' version '1.7.20'
id 'org.jetbrains.kotlin.jvm' version '1.8.0'
id 'org.jetbrains.kotlin.plugin.serialization' version '1.8.0'
id 'com.gradle.plugin-publish' version '1.1.0'
id 'io.github.gradle-nexus.publish-plugin' version '1.1.0'
repositories {
mavenCentral()
gradlePluginPortal()
}
}
plugins {
id 'com.diffplug.blowdryerSetup'
id 'com.diffplug.configuration-cache-for-platform-specific-build' apply false
id 'com.diffplug.spotless' apply false
id 'com.diffplug.spotless-changelog' apply false
id 'org.jetbrains.dokka' apply false
id 'org.jetbrains.kotlin.jvm' apply false
id 'org.jetbrains.kotlin.plugin.serialization' apply false
id 'com.gradle.plugin-publish' apply false
id 'io.github.gradle-nexus.publish-plugin' apply false
// https://github.com/diffplug/blowdryer/blob/main/CHANGELOG.md
id 'com.diffplug.blowdryerSetup' version '1.7.0'
// https://github.com/diffplug/spotless/blob/main/plugin-gradle/CHANGES.md
id 'com.diffplug.spotless' version '6.14.0' apply false
// https://github.com/diffplug/spotless-changelog/blob/main/CHANGELOG.md
id 'com.diffplug.spotless-changelog' version '2.4.1' apply false
// https://plugins.gradle.org/plugin/com.gradle.plugin-publish
id 'com.gradle.plugin-publish' version '1.1.0' apply false
// https://github.com/equodev/equo-ide/blob/main/plugin-gradle/CHANGELOG.md
id 'dev.equo.ide' version '0.12.1' apply false
// https://github.com/gradle-nexus/publish-plugin/releases
id 'io.github.gradle-nexus.publish-plugin' version '1.1.0' apply false
// https://plugins.gradle.org/plugin/org.jetbrains.dokka
id 'org.jetbrains.dokka' version '1.7.20' apply false
// https://plugins.gradle.org/plugin/org.jetbrains.kotlin.jvm
id 'org.jetbrains.kotlin.jvm' version '1.8.0' apply false
// https://plugins.gradle.org/plugin/org.jetbrains.kotlin.plugin.serialization
id 'org.jetbrains.kotlin.plugin.serialization' version '1.8.0' apply false
}

blowdryerSetup {
github 'diffplug/blowdryer-diffplug', 'tag', '6.0.1'
github 'diffplug/blowdryer-diffplug', 'tag', '7.0.0'
//devLocal '../blowdryer-diffplug'
setPluginsBlockTo {
it.file 'plugin.versions'
it.file 'plugin-kotlin.versions'
}
}

include 'atplug-runtime'
Expand Down