Skip to content

Commit 3eaede4

Browse files
committed
Version 1.0 - move to 'org.gradlex'
1 parent c9764cd commit 3eaede4

File tree

23 files changed

+274
-122
lines changed

23 files changed

+274
-122
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Java Module Testing Gradle Plugin - Changelog
2+
3+
## Version 1.0
4+
* Moved project to [GradleX](https://gradlex.org) - new plugin ID: `org.gradlex.java-module-testing`
5+
6+
## Versions 0.1
7+
* Initial features added

README.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
1+
# Java Module Testing Gradle plugin
2+
3+
[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fgradlex-org%2Fjava-module-testing%2Fbadge%3Fref%3Dmain&style=flat)](https://actions-badge.atrox.dev/gradlex-org/java-module-testing/goto?ref=main)
4+
[![Gradle Plugin Portal](https://img.shields.io/maven-metadata/v?label=Plugin%20Portal&metadataUrl=https%3A%2F%2Fplugins.gradle.org%2Fm2%2Forg%2Fgradlex%2Fjava-module-testing%2Forg.gradlex.java-module-testing.gradle.plugin%2Fmaven-metadata.xml)](https://plugins.gradle.org/plugin/org.gradlex.java-module-testing)
5+
16
A Gradle 7.4+ plugin to turn a [JVM Test Suite](https://docs.gradle.org/current/userguide/jvm_test_suite_plugin.html#sec:jvm_test_suite_configuration)
2-
into **Blackbox** or **Whitebox** Test Suite for Java Modules.
7+
into a **Blackbox** or **Whitebox** Test Suite for Java Modules.
38

49
This plugin is maintained by me, [Jendrik Johannes](https://github.com/jjohannes).
510
I offer consulting and training for Gradle and/or the Java Module System - please [reach out](mailto:[email protected]) if you are interested.
611
There is also my [YouTube channel](https://www.youtube.com/playlist?list=PLWQK2ZdV4Yl2k2OmC_gsjDpdIBTN0qqkE) on Gradle topics.
712

8-
If you have a suggestion or a question, please [open an issue](https://github.com/jjohannes/java-module-testing/issues/new).
13+
If you have a suggestion or a question, please [open an issue](https://github.com/gradlex-org/java-module-testing/issues/new).
914

1015
# Java Modules with Gradle
1116

1217
If you plan to build Java Modules with Gradle, you should consider using these plugins on top of Gradle core:
1318

14-
- [`id("de.jjohannes.java-module-dependencies")`](https://github.com/jjohannes/java-module-dependencies)
19+
- [`id("org.gradlex.java-module-dependencies")`](https://github.com/gradlex-org/java-module-dependencies)
1520
Avoid duplicated dependency definitions and get your Module Path under control
16-
- [`id("de.jjohannes.java-module-testing")`](https://github.com/jjohannes/java-module-testing)
21+
- [`id("org.gradlex.java-module-testing")`](https://github.com/gradlex-org/java-module-testing)
1722
Proper test setup for Java Modules
18-
- [`id("de.jjohannes.extra-java-module-info")`](https://github.com/jjohannes/extra-java-module-info)
23+
- [`id("org.gradlex.extra-java-module-info")`](https://github.com/gradlex-org/extra-java-module-info)
1924
Only if your (existing) project cannot avoid using non-module legacy Jars
2025

21-
[Here is a sample](https://github.com/jjohannes/java-module-testing/tree/main/samples/use-all-java-module-plugins)
26+
[Here is a sample](https://github.com/gradlex-org/java-module-testing/tree/main/samples/use-all-java-module-plugins)
2227
that shows all plugins in combination.
2328

2429
[Full Java Module System Project Setup](https://github.com/jjohannes/gradle-project-setup-howto/tree/java_module_system) is a full-fledged Java Module System project setup using these plugins.
@@ -40,7 +45,7 @@ Add this to the build file of your convention plugin's build
4045

4146
```
4247
dependencies {
43-
implementation("de.jjohannes.gradle:java-module-testing:0.1")
48+
implementation("org.gradlex:java-module-testing:1.0")
4449
}
4550
```
4651

@@ -50,7 +55,7 @@ In your convention plugin, apply the plugin.
5055

5156
```
5257
plugins {
53-
id("de.jjohannes.java-module-testing")
58+
id("org.gradlex.java-module-testing")
5459
}
5560
```
5661

@@ -112,3 +117,8 @@ Changes for test runtime (`:test`):
112117
- Now, the main and test classes are both used as locations for test discovery.
113118
By this, Gradle will find the `moudle-info.class` of the main module for the tests.
114119
Using `--patch-module`, _main classes_, _main resources_, _test classes_, and _test resources_ folders are all merged to be treated as one module during test runtime.
120+
121+
# Disclaimer
122+
123+
Gradle and the Gradle logo are trademarks of Gradle, Inc.
124+
The GradleX project is not endorsed by, affiliated with, or associated with Gradle or Gradle, Inc. in any way.

build.gradle.kts

Lines changed: 17 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,31 @@
11
plugins {
2-
id("java-gradle-plugin")
3-
id("maven-publish")
4-
id("com.gradle.plugin-publish") version "0.16.0"
2+
id("groovy")
3+
id("org.gradlex.internal.plugin-publish-conventions") version "0.4"
54
}
65

7-
8-
group = "de.jjohannes.gradle"
9-
version = "0.1"
6+
group = "org.gradlex"
7+
version = "1.0"
108

119
java {
12-
toolchain.languageVersion.set(JavaLanguageVersion.of(8))
10+
sourceCompatibility = JavaVersion.VERSION_1_8
11+
targetCompatibility = JavaVersion.VERSION_1_8
1312
}
1413

1514
dependencies {
1615
testImplementation("org.gradle.exemplar:samples-check:1.0.0")
1716
}
1817

19-
val pluginId = "de.jjohannes.java-module-testing"
20-
val pluginClass = "de.jjohannes.gradle.moduletesting.JavaModuleTestingPlugin"
21-
val pluginName = "Java Module Testing Gradle Plugin"
22-
val pluginDescription = "A plugin to test Java Modules (whitebox and blackbox) without the hassle."
23-
val pluginBundleTags = listOf("java", "modularity", "jigsaw", "jpms", "testing")
24-
val pluginGitHub = "https://github.com/jjohannes/java-module-testing"
25-
26-
gradlePlugin {
27-
plugins {
28-
create(project.name) {
29-
id = pluginId
30-
implementationClass = pluginClass
31-
displayName = pluginName
32-
description = pluginDescription
33-
}
34-
}
35-
}
36-
37-
pluginBundle {
38-
website = pluginGitHub
39-
vcsUrl = pluginGitHub
40-
tags = pluginBundleTags
41-
}
42-
43-
publishing {
44-
publications.withType<MavenPublication>().all {
45-
pom.name.set(pluginName)
46-
pom.description.set(pluginDescription)
47-
pom.url.set(pluginGitHub)
48-
pom.licenses {
49-
license {
50-
name.set("Apache License, Version 2.0")
51-
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
52-
}
53-
}
54-
pom.developers {
55-
developer {
56-
id.set("jjohannes")
57-
name.set("Jendrik Johannes")
58-
email.set("[email protected]")
59-
}
60-
}
61-
pom.scm {
62-
url.set(pluginGitHub)
63-
}
18+
pluginPublishConventions {
19+
id("${project.group}.${project.name}")
20+
implementationClass("org.gradlex.javamodule.testing.JavaModuleTestingPlugin")
21+
displayName("Java Module Testing Gradle Plugin")
22+
description("A plugin to test Java Modules (whitebox and blackbox) without the hassle.")
23+
tags("gradlex", "java", "modularity", "jigsaw", "jpms", "testing")
24+
gitHub("https://github.com/gradlex-org/java-module-testing")
25+
developer {
26+
id.set("jjohannes")
27+
name.set("Jendrik Johannes")
28+
email.set("[email protected]")
6429
}
6530
}
6631

gradle/checkstyle/checkstyle.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<!DOCTYPE module PUBLIC
2+
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
3+
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
4+
<module name="Checker">
5+
<module name="Header">
6+
<property name="headerFile" value="${config_loc}/header.txt"/>
7+
</module>
8+
</module>

gradle/checkstyle/header.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*
2+
* Copyright 2022 the GradleX team.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

samples/use-all-java-module-plugins/build-logic/build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ plugins {
33
}
44

55
dependencies {
6-
implementation("de.jjohannes.gradle:extra-java-module-info:0.12")
7-
implementation("de.jjohannes.gradle:java-module-dependencies:0.7")
8-
implementation("de.jjohannes.gradle:java-module-testing:0.1")
9-
}
6+
implementation("org.gradlex:extra-java-module-info:1.0")
7+
implementation("org.gradlex:java-module-dependencies:1.0")
8+
implementation("org.gradlex:java-module-testing:1.0")
9+
}

samples/use-all-java-module-plugins/build-logic/src/main/kotlin/org.my.gradle.base.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
2-
id("de.jjohannes.extra-java-module-info")
3-
id("de.jjohannes.java-module-dependencies")
2+
id("org.gradlex.extra-java-module-info")
3+
id("org.gradlex.java-module-dependencies")
44
}
55

66
group = "org.my"

samples/use-all-java-module-plugins/build-logic/src/main/kotlin/org.my.gradle.java-module.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
id("java")
33
id("org.my.gradle.base")
4-
id("de.jjohannes.java-module-testing")
4+
id("org.gradlex.java-module-testing")
55
}
66

77
javaModuleTesting.whitebox(

samples/use-only-java-module-testing-plugin/build-logic/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ plugins {
33
}
44

55
dependencies {
6-
implementation("de.jjohannes.gradle:java-module-testing:0.1")
6+
implementation("org.gradlex:java-module-testing:1.0")
77
}

0 commit comments

Comments
 (0)