Original solution sacrifices new api lint check.
Here my solution:
int minSdk = hasProperty('minSdk') ? minSdk.toInteger() : 16
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
| /** | |
| * Created by codezjx on 2016/5/4. | |
| */ | |
| public class CircleImageTransformation implements Transformation { | |
| /** | |
| * A unique key for the transformation, used for caching purposes. | |
| */ | |
| private static final String KEY = "circleImageTransformation"; |
| #!/bin/sh | |
| set -e | |
| if [ -z "$1" ]; then | |
| shot_path=$(date +%Y-%m-%d-%H-%M-%S).mp4 | |
| else | |
| shot_path="$*" | |
| fi |
| <?xml version="1.0" encoding="utf-8"?> | |
| <!-- | |
| Copyright 2016 Google Inc. | |
| Licensed under the Apache License, Version 2.0 (the "License"); | |
| you may not use this file except in compliance with the License. | |
| You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 |
Original solution sacrifices new api lint check.
Here my solution:
int minSdk = hasProperty('minSdk') ? minSdk.toInteger() : 16
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
| #! /bin/bash | |
| mkdir -p ./backgrounds | |
| function get_google_device_art { | |
| local device=$1 | |
| # Get the Google Device backgrounds | |
| curl "https://developer.android.com/distribute/marketing-tools/device-art-resources/$1/port_back.png" > "./backgrounds/$1_port_back.png" | |
| curl "https://developer.android.com/distribute/marketing-tools/device-art-resources/$1/port_fore.png" > "./backgrounds/$1_port_fore.png" |
| #!/usr/bin/python | |
| # License for any modification to the original (linked below): | |
| # ---------------------------------------------------------------------------- | |
| # "THE BEER-WARE LICENSE" (Revision 42): | |
| # Sebastiano Poggi and Daniele Conti wrote this file. As long as you retain | |
| # this notice you can do whatever you want with this stuff. If we meet some day, | |
| # and you think this stuff is worth it, you can buy us a beer in return. | |
| import argparse, sys, subprocess, tempfile |
| import org.junit.rules.TestRule; | |
| import org.junit.runner.Description; | |
| import org.junit.runners.model.Statement; | |
| /** Got flaky tests? Shampoo them away. */ | |
| public final class ShampooRule implements TestRule { | |
| private final int iterations; | |
| public ShampooRule(int iterations) { | |
| if (iterations < 1) throw new IllegalArgumentException("iterations < 1: " + iterations); |
| <?xml version="1.0" encoding="utf-8"?> | |
| <!-- | |
| Copyright (C) 2015 The Android Open Source Project | |
| Licensed under the Apache License, Version 2.0 (the "License"); | |
| you may not use this file except in compliance with the License. | |
| You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 |
| <?xml version="1.0" encoding="utf-8"?><!-- | |
| ~ Copyright (C) 2015 The Android Open Source Project | |
| ~ | |
| ~ Licensed under the Apache License, Version 2.0 (the "License"); | |
| ~ you may not use this file except in compliance with the License. | |
| ~ You may obtain a copy of the License at | |
| ~ | |
| ~ http://www.apache.org/licenses/LICENSE-2.0 | |
| ~ | |
| ~ Unless required by applicable law or agreed to in writing, software |
| #!/bin/bash | |
| # How to install: | |
| # exo-open "http://developer.android.com/sdk/index.html#Other" | |
| # sudo apt-get install libav-tools imagemagick | |
| # wget https://gist.githubusercontent.com/lorenzos/e8a97c1992cddf9c1142/raw/android-screen-to-gif.sh | |
| # chmod a+x android-screen-to-gif.sh | |
| # Help message | |
| function usage() { |