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 "notification/ActiveNotifications", 107 "media/Camera2Raw", 108 "content/AutoBackupForApps", 109 ] 110 111 List<String> taskNames = [ 112 "clean", 113 "refresh", 114 "build", 115 "emitAnt", 116 "emitGradle", 117 "emitBrowseable", 118 "emitGradleZip", 119 ] 120 121 taskNames.each { taskName -> 122 def task = project.hasProperty(taskName) ? project.tasks[taskName] : project.task(taskName) 123 println task 124 samples.each { sample -> 125 File sampleDir = new File(sample) 126 task.dependsOn project.task([type: GradleBuild], "${sample}_${taskName}", { 127 buildFile = "${sample}/build.gradle" 128 dir = sample 129 tasks = [taskName] 130 }) 131 } 132 } 133