Skip to content

Commit 8f036e1

Browse files
committed
Format code
1 parent 72ce4d1 commit 8f036e1

14 files changed

+521
-526
lines changed

src/main/java/org/gradlex/javamodule/moduleinfo/AutomaticModuleName.java

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,4 @@
1-
/*
2-
* Copyright 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-
*/
16-
1+
// SPDX-License-Identifier: Apache-2.0
172
package org.gradlex.javamodule.moduleinfo;
183

194
public class AutomaticModuleName extends ModuleSpec {

src/main/java/org/gradlex/javamodule/moduleinfo/ExtraJavaModuleInfoPlugin.java

Lines changed: 133 additions & 99 deletions
Large diffs are not rendered by default.

src/main/java/org/gradlex/javamodule/moduleinfo/ExtraJavaModuleInfoPluginExtension.java

Lines changed: 31 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,8 @@
1-
/*
2-
* Copyright 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-
*/
16-
1+
// SPDX-License-Identifier: Apache-2.0
172
package org.gradlex.javamodule.moduleinfo;
183

4+
import javax.annotation.Nullable;
5+
import javax.inject.Inject;
196
import org.gradle.api.Action;
207
import org.gradle.api.NamedDomainObjectProvider;
218
import org.gradle.api.artifacts.Configuration;
@@ -28,9 +15,6 @@
2815
import org.gradle.api.provider.Provider;
2916
import org.gradle.api.tasks.SourceSet;
3017

31-
import javax.annotation.Nullable;
32-
import javax.inject.Inject;
33-
3418
/**
3519
* A data class to collect all the module information we want to add.
3620
* Here the class is used as extension that can be configured in the build script
@@ -47,11 +31,17 @@ public abstract class ExtraJavaModuleInfoPluginExtension {
4731
protected abstract ConfigurationContainer getConfigurations();
4832

4933
public abstract MapProperty<String, ModuleSpec> getModuleSpecs();
34+
5035
public abstract Property<Boolean> getFailOnMissingModuleInfo();
36+
5137
public abstract Property<Boolean> getFailOnAutomaticModules();
38+
5239
public abstract Property<Boolean> getFailOnModifiedDerivedModuleNames();
40+
5341
public abstract Property<Boolean> getSkipLocalJars();
42+
5443
public abstract Property<Boolean> getDeriveAutomaticModuleNamesFromFileNames();
44+
5545
public abstract Property<String> getVersionsProvidingConfiguration();
5646

5747
/**
@@ -97,7 +87,8 @@ public void module(String identifier, String moduleName, @Nullable String module
9787
* @param moduleName the Module Name of the Module to construct
9888
* @param moduleVersion version to write into the module-info.class
9989
*/
100-
public void module(Provider<MinimalExternalModuleDependency> alias, String moduleName, @Nullable String moduleVersion) {
90+
public void module(
91+
Provider<MinimalExternalModuleDependency> alias, String moduleName, @Nullable String moduleVersion) {
10192
module(alias.get().getModule().toString(), moduleName, moduleVersion);
10293
}
10394

@@ -119,7 +110,10 @@ public void module(String identifier, String moduleName, @Nullable Action<? supe
119110
* @param moduleName the Module Name of the Module to construct
120111
* @param conf configure exported packages and dependencies, see {@link ModuleInfo}
121112
*/
122-
public void module(Provider<MinimalExternalModuleDependency> alias, String moduleName, @Nullable Action<? super ModuleInfo> conf) {
113+
public void module(
114+
Provider<MinimalExternalModuleDependency> alias,
115+
String moduleName,
116+
@Nullable Action<? super ModuleInfo> conf) {
123117
module(alias.get().getModule().toString(), moduleName, conf);
124118
}
125119

@@ -131,7 +125,11 @@ public void module(Provider<MinimalExternalModuleDependency> alias, String modul
131125
* @param moduleVersion version to write into the module-info.class
132126
* @param conf configure exported packages, dependencies and Jar merging, see {@link ModuleInfo}
133127
*/
134-
public void module(String identifier, String moduleName, @Nullable String moduleVersion, @Nullable Action<? super ModuleInfo> conf) {
128+
public void module(
129+
String identifier,
130+
String moduleName,
131+
@Nullable String moduleVersion,
132+
@Nullable Action<? super ModuleInfo> conf) {
135133
ModuleInfo moduleInfo = new ModuleInfo(identifier, moduleName, moduleVersion, getObjects());
136134
if (conf != null) {
137135
conf.execute(moduleInfo);
@@ -147,7 +145,11 @@ public void module(String identifier, String moduleName, @Nullable String module
147145
* @param moduleVersion version to write into the module-info.class
148146
* @param conf configure exported packages, dependencies and Jar merging, see {@link ModuleInfo}
149147
*/
150-
public void module(Provider<MinimalExternalModuleDependency> alias, String moduleName, @Nullable String moduleVersion, @Nullable Action<? super ModuleInfo> conf) {
148+
public void module(
149+
Provider<MinimalExternalModuleDependency> alias,
150+
String moduleName,
151+
@Nullable String moduleVersion,
152+
@Nullable Action<? super ModuleInfo> conf) {
151153
module(alias.get().getModule().toString(), moduleName, moduleVersion, conf);
152154
}
153155

@@ -178,23 +180,26 @@ public void automaticModule(Provider<MinimalExternalModuleDependency> alias, Str
178180
* @param moduleName the Module Name of the Module to construct
179181
* @param conf configure Jar merging, see {@link AutomaticModuleName}
180182
*/
181-
public void automaticModule(String identifier, String moduleName, @Nullable Action<? super AutomaticModuleName> conf) {
183+
public void automaticModule(
184+
String identifier, String moduleName, @Nullable Action<? super AutomaticModuleName> conf) {
182185
AutomaticModuleName automaticModuleName = new AutomaticModuleName(identifier, moduleName);
183186
if (conf != null) {
184187
conf.execute(automaticModuleName);
185188
}
186189
getModuleSpecs().put(identifier, automaticModuleName);
187190
}
188191

189-
190192
/**
191193
* Add an Automatic-Module-Name to a given Jar file.
192194
*
193195
* @param alias group:name coordinates alias from version catalog
194196
* @param moduleName the Module Name of the Module to construct
195197
* @param conf configure Jar merging, see {@link AutomaticModuleName}
196198
*/
197-
public void automaticModule(Provider<MinimalExternalModuleDependency> alias, String moduleName, @Nullable Action<? super AutomaticModuleName> conf) {
199+
public void automaticModule(
200+
Provider<MinimalExternalModuleDependency> alias,
201+
String moduleName,
202+
@Nullable Action<? super AutomaticModuleName> conf) {
198203
automaticModule(alias.get().getModule().toString(), moduleName, conf);
199204
}
200205

0 commit comments

Comments
 (0)