1
1
package net .byteflux .libby ;
2
2
3
3
import net .byteflux .libby .relocation .Relocation ;
4
- import net .byteflux .libby .transitive .ExcludedDependency ;
5
4
6
5
import java .util .Base64 ;
7
6
import java .util .Collection ;
@@ -83,16 +82,6 @@ public class Library {
83
82
*/
84
83
private final boolean isolatedLoad ;
85
84
86
- /**
87
- * Should transitive dependencies be resolved for this library?
88
- */
89
- private final boolean resolveTransitiveDependencies ;
90
-
91
- /**
92
- * Transitive dependencies that would be excluded on transitive resolvement
93
- */
94
- private final Collection <ExcludedDependency > excludedTransitiveDependencies ;
95
-
96
85
/**
97
86
* Creates a new library.
98
87
*
@@ -105,8 +94,6 @@ public class Library {
105
94
* @param checksum binary SHA-256 checksum or null
106
95
* @param relocations jar relocations or null
107
96
* @param isolatedLoad isolated load for this library
108
- * @param resolveTransitiveDependencies transitive dependencies resolvement for this library
109
- * @param excludedTransitiveDependencies excluded transitive dependencies or null
110
97
*/
111
98
private Library (Collection <String > urls ,
112
99
String id ,
@@ -116,11 +103,9 @@ private Library(Collection<String> urls,
116
103
String classifier ,
117
104
byte [] checksum ,
118
105
Collection <Relocation > relocations ,
119
- boolean isolatedLoad ,
120
- boolean resolveTransitiveDependencies ,
121
- Collection <ExcludedDependency > excludedTransitiveDependencies ) {
106
+ boolean isolatedLoad ) {
122
107
123
- this (urls , null , id , groupId , artifactId , version , classifier , checksum , relocations , isolatedLoad , resolveTransitiveDependencies , excludedTransitiveDependencies );
108
+ this (urls , null , id , groupId , artifactId , version , classifier , checksum , relocations , isolatedLoad );
124
109
}
125
110
126
111
/**
@@ -136,8 +121,6 @@ private Library(Collection<String> urls,
136
121
* @param checksum binary SHA-256 checksum or null
137
122
* @param relocations jar relocations or null
138
123
* @param isolatedLoad isolated load for this library
139
- * @param resolveTransitiveDependencies transitive dependencies resolvement for this library
140
- * @param excludedTransitiveDependencies excluded transitive dependencies or null
141
124
*/
142
125
private Library (Collection <String > urls ,
143
126
Collection <String > repositories ,
@@ -148,9 +131,7 @@ private Library(Collection<String> urls,
148
131
String classifier ,
149
132
byte [] checksum ,
150
133
Collection <Relocation > relocations ,
151
- boolean isolatedLoad ,
152
- boolean resolveTransitiveDependencies ,
153
- Collection <ExcludedDependency > excludedTransitiveDependencies ) {
134
+ boolean isolatedLoad ) {
154
135
155
136
this .urls = urls != null ? Collections .unmodifiableList (new LinkedList <>(urls )) : Collections .emptyList ();
156
137
this .id = id != null ? id : UUID .randomUUID ().toString ();
@@ -172,8 +153,6 @@ private Library(Collection<String> urls,
172
153
this .repositories = repositories != null ? Collections .unmodifiableList (new LinkedList <>(repositories )) : Collections .emptyList ();
173
154
relocatedPath = hasRelocations () ? path + "-relocated.jar" : null ;
174
155
this .isolatedLoad = isolatedLoad ;
175
- this .resolveTransitiveDependencies = resolveTransitiveDependencies ;
176
- this .excludedTransitiveDependencies = excludedTransitiveDependencies != null ? Collections .unmodifiableList (new LinkedList <>(excludedTransitiveDependencies )) : Collections .emptyList ();
177
156
}
178
157
179
158
/**
@@ -329,19 +308,6 @@ public boolean isSnapshot() {
329
308
return version .endsWith ("-SNAPSHOT" );
330
309
}
331
310
332
- /**
333
- * Should transitive dependencies of this resolved
334
- *
335
- * @return true if the transitive dependencies of this library would be resolved
336
- */
337
- public boolean resolveTransitiveDependencies () {
338
- return resolveTransitiveDependencies ;
339
- }
340
-
341
- public Collection <ExcludedDependency > getExcludedTransitiveDependencies () {
342
- return excludedTransitiveDependencies ;
343
- }
344
-
345
311
/**
346
312
* Gets a concise, human-readable string representation of this library.
347
313
*
@@ -422,16 +388,6 @@ public static class Builder {
422
388
*/
423
389
private final Collection <Relocation > relocations = new LinkedList <>();
424
390
425
- /**
426
- * Resolve transitive dependencies
427
- */
428
- private boolean resolveTransitiveDependencies ;
429
-
430
- /**
431
- * Resolve transitive dependencies exclusions
432
- */
433
- private final Collection <ExcludedDependency > excludedTransitiveDependencies = new LinkedList <>();
434
-
435
391
/**
436
392
* Adds a direct download URL for this library.
437
393
*
@@ -565,49 +521,13 @@ public Builder relocate(String pattern, String relocatedPattern) {
565
521
return relocate (new Relocation (pattern , relocatedPattern ));
566
522
}
567
523
568
- /**
569
- * Sets the transitive dependency resolvement for this library.
570
- *
571
- * @param resolveTransitiveDependencies the transitive dependency resolvement
572
- * @return this builder
573
- * @see #excludeTransitiveDependency(ExcludedDependency)
574
- */
575
- public Builder resolveTransitiveDependencies (boolean resolveTransitiveDependencies ) {
576
- this .resolveTransitiveDependencies = resolveTransitiveDependencies ;
577
- return this ;
578
- }
579
-
580
- /**
581
- * Excludes transitive dependency for this library.
582
- *
583
- * @param excludedDependency Excluded transitive dependency
584
- * @return this builder
585
- * @see #resolveTransitiveDependencies(boolean)
586
- */
587
- public Builder excludeTransitiveDependency (ExcludedDependency excludedDependency ) {
588
- excludedTransitiveDependencies .add (excludedDependency );
589
- return this ;
590
- }
591
-
592
- /**
593
- * Excludes transitive dependency for this library.
594
- *
595
- * @param groupId Excluded transitive dependency group ID
596
- * @param artifactId Excluded transitive dependency artifact ID
597
- * @return this builder
598
- * @see #excludeTransitiveDependency(ExcludedDependency)
599
- */
600
- public Builder excludeTransitiveDependency (String groupId , String artifactId ) {
601
- return excludeTransitiveDependency (new ExcludedDependency (groupId , artifactId ));
602
- }
603
-
604
524
/**
605
525
* Creates a new library using this builder's configuration.
606
526
*
607
527
* @return new library
608
528
*/
609
529
public Library build () {
610
- return new Library (urls , repositories , id , groupId , artifactId , version , classifier , checksum , relocations , isolatedLoad , resolveTransitiveDependencies , excludedTransitiveDependencies );
530
+ return new Library (urls , repositories , id , groupId , artifactId , version , classifier , checksum , relocations , isolatedLoad );
611
531
}
612
532
}
613
533
}
0 commit comments