More information of
gradle-screen-record with rich pictures, please see this blog:
- Mac osx
0. Working with gradle environment
Gradle is required.
1. Prepare tools (Skip this part if installed)
Make sure these tools installed，or else install them first:
- adb: We use it to get screen-record files with
- ffmpeg: We use it to convert the format of these files, from
More infomation about Prepare tools
gradle-screen-record (Just one line)
gradle-screen-record in rootProject/build.gradle,
don't forget to Sync Gradle !!!:
apply from: "https://raw.githubusercontent.com/fashare2015/gradle-screen-record/master/screen-record.gradle"
3. Record Screen
excute gradle cmd
excute gradle cmd with three params:
- PfileName: [Required] Name of output gif(without postfix).
- Psize: [Optional] Size of output gif.
- Ptime: [Optional] Time of output gif.
./gradlew screenRecord -PfileName=test
./gradlew screenRecord -PfileName=test -Psize=1080x1920 -Ptime=5
operate your modile phone
When you see "> Building 50% > :screenRecord" in the terminal, the screen recording is begining. Just operate your modile phone as you want, and it will stop after "-Ptime" second.
4. Complete !!!
You will find the generated gif file in rootProject/screen-record/test.gif !!!
By the way, add it to git~
git add screen-record/.
support for windows.
Make issues or pull request, if you have good ideas ~