Skip to content

Commit 390c4b0

Browse files
committed
Gradle-ify the project to prepare for multi-module publishing
1 parent c25a88d commit 390c4b0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+371
-40
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ charset = utf-8
99
indent_style = space
1010
indent_size = 4
1111

12-
[.github/workflows/*.yml]
12+
[*.yml]
1313
indent_size = 2

.github/dependabot.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: 2
22
updates:
3-
- package-ecosystem: maven
4-
directory: "/"
5-
schedule:
6-
interval: daily
7-
open-pull-requests-limit: 10
3+
- package-ecosystem: maven
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
open-pull-requests-limit: 10

.github/workflows/pr.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ jobs:
1313
with:
1414
distribution: temurin
1515
java-version: '17'
16-
cache: maven
16+
cache: gradle
1717

1818
- name: 🏗️ Build & test
1919
run: |
20-
mvn -version
21-
export MAVEN_HOME="$(whereis mvn)"
22-
mvn clean verify -Dorg.slf4j.simpleLogger.showDateTime=true "-Dorg.slf4j.simpleLogger.dateTimeFormat=yyyy-MM-dd HH:mm:ss"
20+
./gradlew --version --no-daemon
21+
./gradlew clean publishToMavenLocal -i --no-daemon --warning-mode all

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Maven
12
target/
23
pom.xml.tag
34
pom.xml.releaseBackup
@@ -10,6 +11,11 @@ buildNumber.properties
1011
# https://github.com/takari/maven-wrapper#usage-without-binary-jar
1112
.mvn/wrapper/maven-wrapper.jar
1213

14+
# Gradle
15+
.gradle/
16+
build/
17+
gradle/libs.versions.toml
18+
1319
# IntelliJ
1420
.idea/
1521
*.iml

.travis.yml

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

README.md

Lines changed: 24 additions & 7 deletions

build.gradle.kts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
group = "com.github.fridujo"
2+
version = "1.0.1-SNAPSHOT"
3+
description = "classpath-junit-extension"
4+
5+
allprojects {
6+
repositories {
7+
mavenLocal()
8+
mavenCentral()
9+
}
10+
11+
apply {
12+
plugin("base")
13+
}
14+
15+
tasks.withType<JavaCompile> {
16+
options.encoding = "UTF-8"
17+
}
18+
19+
tasks.withType<Javadoc> {
20+
options.encoding = "UTF-8"
21+
(options as CoreJavadocOptions).addStringOption("Xdoclint:all,-missing", "-quiet")
22+
}
23+
24+
tasks.withType<Test> {
25+
useJUnitPlatform()
26+
}
27+
}
28+
29+
subprojects {
30+
apply {
31+
plugin("java")
32+
plugin("java-library")
33+
}
34+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
plugins {
2+
`maven-publish`
3+
}
4+
5+
group = "com.github.fridujo"
6+
version = "1.0.1-SNAPSHOT"
7+
8+
java {
9+
withSourcesJar()
10+
withJavadocJar()
11+
}
12+
13+
publishing {
14+
publications.create<MavenPublication>("maven") {
15+
from(components["java"])
16+
}
17+
}
18+
19+
dependencies {
20+
compileOnly(libs.org.apache.maven.resolver.maven.resolver.api)
21+
compileOnly(libs.org.apache.maven.resolver.maven.resolver.spi)
22+
compileOnly(libs.org.apache.maven.resolver.maven.resolver.impl)
23+
compileOnly(libs.org.junit.jupiter.junit.jupiter.api)
24+
25+
api(libs.ch.qos.logback.logback.classic)
26+
api(libs.eu.maveniverse.maven.mima.context)
27+
api(libs.com.fasterxml.jackson.dataformat.jackson.dataformat.xml)
28+
29+
runtimeOnly(libs.eu.maveniverse.maven.mima.runtime.standalone.static)
30+
31+
testImplementation(libs.org.junit.jupiter.junit.jupiter)
32+
testImplementation(libs.org.assertj.assertj.core)
33+
testImplementation(libs.org.mockito.mockito.core)
34+
testImplementation(libs.com.google.guava.guava)
35+
}

0 commit comments

Comments
 (0)