|
Lines 117-122
Link Here
|
| 117 |
String manifests; |
117 |
String manifests; |
| 118 |
String sourceLocations; |
118 |
String sourceLocations; |
| 119 |
boolean allowNonApiProject = false; |
119 |
boolean allowNonApiProject = false; |
|
|
120 |
boolean treatFriendPackagesAsApi = false; |
| 120 |
/** |
121 |
/** |
| 121 |
* The encoding to read the source files with |
122 |
* The encoding to read the source files with |
| 122 |
* |
123 |
* |
|
Lines 197-202
Link Here
|
| 197 |
*/ |
198 |
*/ |
| 198 |
public void setAllowNonApiProject(String allow) { |
199 |
public void setAllowNonApiProject(String allow) { |
| 199 |
this.allowNonApiProject = Boolean.valueOf(allow).booleanValue(); |
200 |
this.allowNonApiProject = Boolean.valueOf(allow).booleanValue(); |
|
|
201 |
} |
| 202 |
|
| 203 |
/** |
| 204 |
* Set if the task should treat packages as API that are only exposed via |
| 205 |
* x-friends. |
| 206 |
* <p> |
| 207 |
* The possible values are: <code>true</code> or <code>false</code> |
| 208 |
* </p> |
| 209 |
* <p> |
| 210 |
* Default is: <code>false</code>. |
| 211 |
* </p> |
| 212 |
* |
| 213 |
* @since 1.2 |
| 214 |
* @param allow |
| 215 |
*/ |
| 216 |
public void setTreatFriendPackagesAsApi(String allow) { |
| 217 |
this.treatFriendPackagesAsApi = Boolean.valueOf(allow).booleanValue(); |
| 200 |
} |
218 |
} |
| 201 |
|
219 |
|
| 202 |
/** |
220 |
/** |
|
Lines 289-294
Link Here
|
| 289 |
} |
307 |
} |
| 290 |
if (this.sourceLocations != null) { |
308 |
if (this.sourceLocations != null) { |
| 291 |
System.out.println("Extra source locations entries : " + this.sourceLocations); //$NON-NLS-1$ |
309 |
System.out.println("Extra source locations entries : " + this.sourceLocations); //$NON-NLS-1$ |
|
|
310 |
} |
| 311 |
if (this.treatFriendPackagesAsApi) { |
| 312 |
System.out.println("Packages only exposed via x-friends are treated as API"); //$NON-NLS-1$ |
| 292 |
} |
313 |
} |
| 293 |
} |
314 |
} |
| 294 |
// collect all compilation units |
315 |
// collect all compilation units |
|
Lines 534-539
Link Here
|
| 534 |
include = false; |
555 |
include = false; |
| 535 |
break loop; |
556 |
break loop; |
| 536 |
} |
557 |
} |
|
|
558 |
if (treatFriendPackagesAsApi && "x-friends".equals(directive)) { //$NON-NLS-1$ |
| 559 |
include = true; |
| 560 |
break loop; |
| 561 |
} |
| 537 |
} |
562 |
} |
| 538 |
if (include) { |
563 |
if (include) { |
| 539 |
set.add(packageName.getValue()); |
564 |
set.add(packageName.getValue()); |