Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build tuneup #38

Merged
merged 25 commits into from
Jul 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
ac320ce
Bump to latest Gradle version
tomdcc Jul 26, 2023
2513fd0
Build with Java 11, use toolchains
tomdcc Jul 26, 2023
2b6f166
Bump asciidoctor plugin
tomdcc Jul 26, 2023
616cb1a
Add plugins build
tomdcc Jul 26, 2023
901dd90
Convert java module deps to version catalog
tomdcc Jul 26, 2023
c8fbbca
Convert core lib deps to version catalog
tomdcc Jul 26, 2023
c91714a
Convert remaining deps to version catalog
tomdcc Jul 27, 2023
5ac1320
Convert publish script to plugin
tomdcc Jul 27, 2023
12d4220
Remove unused task
tomdcc Jul 27, 2023
d6a464e
Remove unused
tomdcc Jul 27, 2023
24e6c3e
Remove idea plugin
tomdcc Jul 27, 2023
046fce6
Move most of javaModule to kotlin plugin
tomdcc Jul 27, 2023
67fdcf0
Move code quality scripts to kotlin plugins
tomdcc Jul 28, 2023
a83f348
Move integ test scripts to kotlin plugins
tomdcc Jul 28, 2023
75c8b7a
Move scan config to kotlin plugin, apply CCUD
tomdcc Jul 28, 2023
2a4f07e
Check extra property correctly
tomdcc Jul 28, 2023
dba56ec
Publish and consume shadow jar correctly
tomdcc Jul 28, 2023
09eafe2
Convert project build scripts to kotlin
tomdcc Jul 28, 2023
2148e4d
Fix token replacement
tomdcc Jul 28, 2023
4b88a28
Switch to using the nexus publish plugin
tomdcc Jul 30, 2023
9f52086
Don't fail when no publishing credentials set
tomdcc Jul 31, 2023
fc800fa
Use type-safe project accessors
tomdcc Jul 31, 2023
d92cf76
Remove explicit configuration of sonatype credentials
tomdcc Jul 31, 2023
542fd07
Use build parameters plugin
tomdcc Jul 31, 2023
ab77937
Allow manual trigger of snapshot publish action
tomdcc Jul 31, 2023
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
1 change: 1 addition & 0 deletions .github/workflows/gradle-build-and-publish-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- main
workflow_dispatch:

jobs:
call-gradle-build:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/gradle-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 8
java-version: |
8
11

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/gradle-publish-snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 8
java-version: |
8
11

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Publish snapshots
env:
ORG_GRADLE_PROJECT_sonatypeSnapshotsUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatypeSnapshotsPassword: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
run: ./gradlew publishSnapshots
2 changes: 1 addition & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- Remove snapshot from version
- Update version numbers in README
- Commit, ensure build is green
- Run `./gradlew clean; ./gradlew publishMavenPublicationToSonatypeStagingRepository -Dorg.gradle.parallel=false`
- Run `./gradlew clean; ./gradlew publishToSonatype -Dorg.gradle.parallel=false`
- Close and release repo in oss.sonatype.org
- `git tag v0.x`
- `git push origin v0.x`
Expand Down
95 changes: 0 additions & 95 deletions doc/manual/manual.gradle

This file was deleted.

101 changes: 101 additions & 0 deletions doc/manual/manual.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
import java.awt.Desktop.getDesktop

/*
* Copyright 2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

plugins {
alias(libs.plugins.asciidoctor)
id("build.publish")
}

repositories {
mavenCentral()
}

tasks.asciidoctor.configure {
baseDirFollowsSourceDir()
}

val api by tasks.registering(Javadoc::class) {
group = "manual"
description = "Generate combined Javadoc for all published modules"

destinationDir = file("$buildDir/api")

val javadocTasks = rootProject.subprojects
.filter { it.plugins.hasPlugin("java") && it.plugins.hasPlugin("build.publish") }
.map { it.tasks.named<Javadoc>("javadoc").get() }

javadocTasks.forEach { source(it.source) }
classpath = files(javadocTasks.map { it.classpath })

(options as StandardJavadocDocletOptions).run {
isUse = true
links("http://docs.oracle.com/javase/8/docs/api/")
windowTitle = "MiniProfiler JVM API ($project.version)"
docTitle = "MiniProfiler JVM API ($project.version)"
}
}

val packageManual by tasks.registering(Sync::class) {
group = "manual"
description = "Brings together manual and API reference"

into("$buildDir/manual")
from(tasks.asciidoctor)

into("api") {
from(api)
}
}

val openApi by tasks.registering {
dependsOn(packageManual)
group = "manual"
description = "Builds the API reference, then opens it in your web browser"

doLast {
getDesktop().browse(file("$packageManual.destinationDir/api/index.html").toURI())
}
}

val openManual by tasks.registering {
dependsOn(packageManual)
group = "manual"
description = "Builds the manual, then opens it in your web browser"

doLast {
getDesktop().browse(file("$packageManual.destinationDir/index.html").toURI())
}
}

val manualZip by tasks.registering(Zip::class) {
from(packageManual)
}

artifacts {
archives(manualZip)
}

publishing {
publications.named<MavenPublication>("maven") {
artifactId = "miniprofiler-manual"
pom {
name = "MiniProfiler Manual"
description = "The manual for MiniProfiler JVM"
}
}
}
33 changes: 0 additions & 33 deletions gradle/browserTest.gradle

This file was deleted.

49 changes: 0 additions & 49 deletions gradle/buildScan.gradle

This file was deleted.

49 changes: 0 additions & 49 deletions gradle/checkstyle.gradle

This file was deleted.

20 changes: 0 additions & 20 deletions gradle/codenarc.gradle

This file was deleted.

Loading
Loading