Skip to content

Commit 1467b12

Browse files
committed
Remove OSGi variable names and comments.
1 parent 5e175d9 commit 1467b12

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

atplug-plugin-gradle/src/main/java/com/diffplug/atplug/tooling/PlugGenerator.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class PlugGenerator internal constructor(toSearches: List<File>, toLinkAgainst:
108108
/**
109109
* @param plugClass The class for which we are generating plugin metadata.
110110
* @param socketClass The interface which is the socket for the metadata.
111-
* @return A string containing the content of OSGI-INF as appropriate for clazz.
111+
* @return A string containing the content of ATPLUG-INF as appropriate for clazz.
112112
*/
113113
private fun <SocketT, PlugT : SocketT> generatePluginTyped(
114114
plugClass: Class<PlugT>,
@@ -124,12 +124,12 @@ class PlugGenerator internal constructor(toSearches: List<File>, toLinkAgainst:
124124

125125
companion object {
126126
/**
127-
* Returns a Map from a plugin's name to its OSGI-INF content.
127+
* Returns a Map from a plugin's name to its ATPLUG-INF content.
128128
*
129129
* @param toSearch a directory containing class files where we will look for plugin
130130
* implementations
131131
* @param toLinkAgainst the classes that these plugins implementations need
132-
* @return a map from component name to is OSGI-INF string content
132+
* @return a map from component name to is ATPLUG-INF string content
133133
*/
134134
fun generate(toSearch: List<File>, toLinkAgainst: Set<File>): SortedMap<String, String> {
135135
return try {

atplug-plugin-gradle/src/main/java/com/diffplug/atplug/tooling/gradle/PlugGenerateTask.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public abstract class PlugGenerateTask extends DefaultTask {
6767
public PlugGenerateTask() {
6868
this.getOutputs().upToDateWhen(unused -> {
6969
Manifest manifest = loadManifest();
70-
String componentsCmd = serviceComponents();
70+
String componentsCmd = atplugComponents();
7171
String componentsActual = manifest.getMainAttributes().getValue(PlugPlugin.SERVICE_COMPONENT);
7272
return Objects.equals(componentsActual, componentsCmd);
7373
});
@@ -125,7 +125,7 @@ public void build() throws Throwable {
125125
// generate the metadata
126126
SortedMap<String, String> result = generate();
127127

128-
// clean out the osgiInf folder, and put the map's content into the folder
128+
// clean out the ATPLUG-INF folder, and put the map's content into the folder
129129
FileMisc.cleanDir(getAtplugInfFolder());
130130
for (Map.Entry<String, String> entry : result.entrySet()) {
131131
File serviceFile = new File(getAtplugInfFolder(), entry.getKey() + PlugPlugin.DOT_JSON);
@@ -135,7 +135,7 @@ public void build() throws Throwable {
135135
// the resources directory *needs* the Service-Component entry of the manifest to exist in order for tests to work
136136
// so we'll get a manifest (empty if necessary, but preferably we'll load what already exists)
137137
Manifest manifest = loadManifest();
138-
String componentsCmd = serviceComponents();
138+
String componentsCmd = atplugComponents();
139139
String componentsActual = manifest.getMainAttributes().getValue(PlugPlugin.SERVICE_COMPONENT);
140140
if (Objects.equals(componentsActual, componentsCmd)) {
141141
return;
@@ -197,16 +197,16 @@ private SortedMap<String, String> generate() throws Throwable {
197197
}
198198
}
199199

200-
private String serviceComponents() {
201-
return serviceComponents(getAtplugInfFolder());
200+
private String atplugComponents() {
201+
return atplugComponents(getAtplugInfFolder());
202202
}
203203

204-
static String serviceComponents(File osgiInf) {
205-
if (!osgiInf.isDirectory()) {
204+
static String atplugComponents(File atplugInf) {
205+
if (!atplugInf.isDirectory()) {
206206
return null;
207207
} else {
208208
List<String> serviceComponents = new ArrayList<>();
209-
for (File file : FileMisc.list(osgiInf)) {
209+
for (File file : FileMisc.list(atplugInf)) {
210210
if (file.getName().endsWith(PlugPlugin.DOT_JSON)) {
211211
serviceComponents.add(PlugPlugin.ATPLUG_INF + file.getName());
212212
}

atplug-plugin-gradle/src/main/java/com/diffplug/atplug/tooling/gradle/PlugPlugin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
/**
3636
* `plugGenerate` task uses `@Plug` to generate files
37-
* in `src/main/resources/OSGI-INF` as a dependency of
37+
* in `src/main/resources/ATPLUG-INF` as a dependency of
3838
* `processResources`.
3939
*/
4040
public class PlugPlugin implements Plugin<Project> {
@@ -91,7 +91,7 @@ static class SetServiceComponentHeader implements Serializable, Action<Task> {
9191

9292
@Override
9393
public void execute(Task task) {
94-
String serviceComponents = PlugGenerateTask.serviceComponents(atplugInfFolder);
94+
String serviceComponents = PlugGenerateTask.atplugComponents(atplugInfFolder);
9595
Jar jarTask = (Jar) task;
9696
if (serviceComponents == null) {
9797
jarTask.getManifest().getAttributes().remove(PlugPlugin.SERVICE_COMPONENT);

0 commit comments

Comments
 (0)