惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Docker
G
Google Developers Blog
J
Java Code Geeks
B
Blog
C
Check Point Blog
云风的 BLOG
云风的 BLOG
MyScale Blog
MyScale Blog
I
InfoQ
A
About on SuperTechFans
WordPress大学
WordPress大学
F
Fortinet All Blogs
S
SegmentFault 最新的问题
T
Tailwind CSS Blog
Hugging Face - Blog
Hugging Face - Blog
博客园 - 【当耐特】
Microsoft Azure Blog
Microsoft Azure Blog
M
MIT News - Artificial intelligence
月光博客
月光博客
Y
Y Combinator Blog
Jina AI
Jina AI
V
V2EX
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
腾讯CDC
Apple Machine Learning Research
Apple Machine Learning Research

ashishb.net

A day in Luxembourg - the richest country in the world I was asked to install malware during a fake interview Book summary: Breakneck - China's quest to engineer the future by Dan Wang Book summary: How to Teach Your Baby to Read Book Summary: The Discontented Little Baby Book by Pamela Douglas Introducing Amazing Sandbox - run third-party tools and AI agents securely on your machine Why software outsourcing gets a bad reputation? Book summary: The Natural Baby Sleep Solution by Polly Moore A day in Antwerp, Belgium Journey of online influencers Two days in Brussels, Belgium Shortcuts - when we love them and when we don't A visit to Rakhigarhi Three days in overhyped Paris Empty Japan, crowded Tokyo The real lock-in in GitHub is not the code, but the stars 11-day Norwegian Breakaway East Caribbean cruise Sanskrit and Sri Lankan Air Force Use REST with Open API The Achilles heel of American capitalism Costa Rica in 4 days At a juice stall in Sri Lanka A short stay at Warsaw, Poland Best practices for using Python & uv inside Docker Two days in Vilnius, Lithuania How IntelliJ IDEs waste disk space Pregnancy Why there aren't many digital nomads from India Two days in Riga, Latvia To keep your machine secure, run third-party tools inside Docker
Use Makefile for Android
Ashish Bhatia · 2024-05-12 · via ashishb.net

I use Makefile for Android just like I use Makefile for my non-Android side-projects.

Gradle is great for building Android apks and libraries. However, adding custom commands and running them is hard. Further, try specifying a particular version of Java (e.g. Java 17) to use with Gradle and the command line becomes really long.

Further, if you want to do more things, like running End to end tests or uploading releases to Google Play with Fastlane, adding them to Gradle becomes really difficult.

Here are the commands that I have added to my Makefile.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# To build a debug build
buildDebug
# To update stale dependencies
checkDependenciesForUpdates
# Clean the build
clean
# Install the debug build on attached device/emulator
installDebug
# Lint the debug build
lintDebug
# Lint the release build
lintRelease

# Open Google Play dashboard in the browser
openGooglePlayDashboard

# Start Android Auto app for testing
startAndroidAutoTesting

# Test local build with Maestro on a local device (>= API 29)
testOnLocalDevice
# Test local build with Maestro on mobile.dev
testOnMaestroCloud

# Upload to Google Play - no urgency, 10% rollout
uploadReleaseNormal
# Upload to Google Play with urgency set, 99% rollout
uploadReleaseUrgent