1 List<String> samples = [ 2 "security/keystore/BasicAndroidKeyStore", 3 "connectivity/sync/BasicSyncAdapter", 4 "connectivity/network/NetworkConnect", 5 "connectivity/network/BasicNetworking", 6 "connectivity/bluetooth/BluetoothLeGatt", 7 "content/multiuser/AppRestrictions", 8 "content/contacts/BasicContactables", 9 "content/documentsUi/StorageClient", 10 "content/documentsUi/StorageProvider", 11 "views/TextLinkify", 12 "input/gestures/BasicGestureDetect", 13 "input/multitouch/BasicMultitouch", 14 "testing/ActivityInstrumentation", 15 "media/MediaRecorder", 16 "media/BasicMediaRouter", 17 "media/BasicMediaDecoder", 18 "ui/holo/BorderlessButtons", 19 "ui/accessibility/BasicAccessibility", 20 "ui/lists/CustomChoiceList", 21 "ui/views/TextSwitcher", 22 "ui/views/HorizontalPaging", 23 "ui/actionbarcompat/ActionBarCompat-Basic", 24 "ui/actionbarcompat/ActionBarCompat-Styled", 25 "ui/actionbarcompat/ActionBarCompat-ListPopupMenu", 26 "ui/actionbarcompat/ActionBarCompat-ShareActionProvider", 27 "notification/BasicNotifications", 28 "notification/CustomNotifications", 29 "ui/actionbar/DoneBar", 30 "ui/graphics/PdfRendererBasic", 31 "ui/window/BasicImmersiveMode", 32 "ui/window/AdvancedImmersiveMode", 33 "ui/window/ImmersiveMode", 34 "background/alarms/RepeatingAlarm", 35 "renderScript/BasicRenderScript", 36 "renderScript/RenderScriptIntrinsic", 37 "ui/views/SlidingTabs/SlidingTabsBasic", 38 "ui/views/SlidingTabs/SlidingTabsColors", 39 "connectivity/nfc/BeamLargeFiles", 40 "connectivity/nfc/CardEmulation", 41 "connectivity/nfc/CardReader", 42 "sensors/BatchStepSensor", 43 "ui/graphics/DisplayingBitmaps", 44 "ui/transition/BasicTransition", 45 "ui/transition/CustomTransition", 46 "ui/views/SwipeRefreshLayout/SwipeRefreshLayoutBasic", 47 "ui/views/SwipeRefreshLayout/SwipeRefreshListFragment", 48 "ui/views/SwipeRefreshLayout/SwipeRefreshMultipleViews", 49 "media/MediaBrowserService", 50 "media/MediaRouter", 51 "media/MediaEffects", 52 "admin/BasicManagedProfile", 53 "media/Camera2Basic", 54 "media/Camera2Video", 55 "ui/activityscenetransition/ActivitySceneTransitionBasic", 56 "ui/views/NavigationDrawer", 57 "ui/views/Elevation/ElevationBasic", 58 "ui/views/Elevation/ElevationDrag", 59 "ui/views/Clipping/ClippingBasic", 60 "ui/views/FloatingActionButton/FloatingActionButtonBasic", 61 "ui/views/RevealEffect/RevealEffectBasic", 62 "background/JobScheduler", 63 "ui/views/RecyclerView", 64 "ui/views/CardView", 65 "notification/LNotifications", 66 "notification/MessagingService", 67 "ui/DrawableTinting", 68 "ui/Interpolator", 69 "media/HdrViewfinder", 70 "ui/activitytasks/DocumentCentricApps", 71 "ui/activitytasks/DocumentCentricRelinquishIdentity", 72 "admin/AppRestrictionEnforcer", 73 "admin/AppRestrictionSchema", 74 "connectivity/bluetooth/BluetoothChat", 75 "wearable/wear/AgendaData", 76 "wearable/wear/DataLayer", 77 "wearable/wear/DelayedConfirmation", 78 "wearable/wear/ElizaChat", 79 "wearable/wear/FindMyPhone", 80 "wearable/wear/Flashlight", 81 "wearable/wear/Geofencing", 82 "wearable/wear/GridViewPager", 83 "wearable/wear/JumpingJack", 84 "wearable/wear/Notifications", 85 "wearable/wear/Quiz", 86 "wearable/wear/RecipeAssistant", 87 "wearable/wear/SkeletonWearableApp", 88 "wearable/wear/SpeedTracker", 89 "wearable/wear/SynchronizedNotifications", 90 "wearable/wear/Timer", 91 "wearable/wear/WatchViewStub", 92 "wearable/wear/WatchFace", 93 "content/webview/PermissionRequest", 94 "content/documentsUi/DirectorySelection", 95 "system/AppUsageStatistics", 96 "media/ScreenCapture", 97 "admin/NfcProvisioning", 98 "admin/DeviceOwner", 99 "wearable/wear/XYZTouristAttractions", 100 "connectivity/bluetooth/BluetoothAdvertisements", 101 "wearable/wear/AlwaysOn", 102 "security/ConfirmCredential", 103 "security/FingerprintDialog", 104 "system/RuntimePermissions", 105 "system/RuntimePermissionsBasic", 106 "wearable/wear/RuntimePermissionsWear", 107 "notification/ActiveNotifications", 108 "media/Camera2Raw", 109 "content/AutoBackupForApps", 110 "ui/window/MultiWindowPlayground", 111 "content/documentsUi/ScopedDirectoryAccess", 112 "security/DirectBoot", 113 "content/DirectShare", 114 "media/MidiScope", 115 "media/MidiSynth", 116 "security/AsymmetricFingerprintDialog", 117 "wearable/wear/WearSpeakerSample", 118 "wearable/wear/WearDrawers", 119 "ui/window/DragAndDropAcrossApps", 120 ] 121 122 List<String> taskNames = [ 123 "clean", 124 "refresh", 125 "assembleDebug", 126 "build", 127 "check", 128 "connectedCheck", 129 "deviceCheck", 130 "emitAnt", 131 "emitGradle", 132 "emitBrowseable", 133 "emitGradleZip", 134 ] 135 136 taskNames.each { taskName -> 137 def task = project.hasProperty(taskName) ? project.tasks[taskName] : project.task(taskName) 138 println task 139 samples.each { sample -> 140 File sampleDir = new File(sample) 141 task.dependsOn project.task([type: GradleBuild], "${sample}_${taskName}", { 142 buildFile = "${sample}/build.gradle" 143 dir = sample 144 tasks = [taskName] 145 }) 146 } 147 } 148