discover method
Implementation
@override
Future<List<CleanupTarget>> discover() async {
if (!platform.isMacOS) return const [];
final targets = <CleanupTarget>[];
final derivedData = platform.xcodeDerivedData;
final pods = platform.cocoaPodsCache;
if (config.clean.xcode && derivedData != null) {
targets.add(
CleanupTarget(
id: 'apple:derived-data',
label: 'Xcode DerivedData',
path: derivedData,
category: CleanupCategory.apple,
),
);
}
if (config.clean.cocoapods && pods != null) {
targets.add(
CleanupTarget(
id: 'apple:cocoapods-cache',
label: 'CocoaPods cache',
path: pods,
category: CleanupCategory.apple,
),
);
}
return targets;
}