android


Android + gradle: injecting a task into build


I have a custom script which runs on the source (.java) and AndroidManifest.xml.
I'd like to execute this script as part of the gradle build process at the start of the assembleRelease task (maybe just after app:preBuild).
Any idea of how I can go about doing this?
I know I can do something like this to exec the script:
task DoStuff(type:Exec) {
workingDir 'path/to/script'
commandLine 'python3', 'do_stuff.py'
}
But I'm not sure where to put that, etc...
You can add a custom action to assembleRelease with doFirst method:
assembleRelease.doFirst {
//invoke python script but there's no access to `workingDir` or `commandLine`
//because it's an action not a task
}
or define dependency:
assembleRelease.dependsOn DoStuff
assembleRelease.mustRunAfter DoStuff //this might be redundant

Related Links

edit apk decompiled code
How To Get A Part Of String?
How to prompt the user to choose default navigation application
Device specific bug with CompassOverlay?
Is it okay to use the same layout for two different activities?
Android: Variable has two states
Android TV | How to Center ListRow Items within a parent view (HorizontalGridView)
Is there any way can let greenDAO support android data-binding now?
how to get a boolean value of checkbox whether it is checked or unchecked- android studio?
Android. Gradle build error: Error parsing XML: not well-formed (invalid token)
Surface Texture object is not getting the frames from a Surface Class
Android ActionBar API, getSupportActionBar() and setDisplayHomeAsUpEnable meaning?
How to get package name of any application after successful installation in android? [duplicate]
Android: chrome custom tab on eclipse?
Android Spinner - How to position dropdown arrow as close to text as possible when options have different length?
SlidingTabLayout text & background color customization

Categories

HOME
shell
notepad++
cobalt
webdriver
google-spreadsheet
angular2-material
jmx
toolbox
fftw
obfuscation
pdfbox
scripting
alsa
python-multithreading
android-json
google-admin-sdk
jtextpane
frontend
octave
plist
resultset
mxgraph
rtf
speech-synthesis
plink
package-managers
scsi
forgot-password
production
simpleitk
ksh
postscript
windows-server-2003
winexe
recurring-events
glib
laravel-eloquent
processwire
navigator
openproject
release
filesystemwatcher
chef-solo
levenshtein-distance
logback-groovy
angular-http
lampp
mschart
aquamacs
truezip
android-testing
mach-o
gpg-signature
rxtx
usart
redbeard-ios
burrows-wheeler-transform
uicolor
shopping
piracy-prevention
phpgrid
ascii-art
rasterize
asyncdisplaykit
jbase
iokit
file-move
microsoft-reporting
ess
fuelcms
cgi-bin
typemock
skspritenode
rrule
bcache
webmatrix-3
sip-server
machine-instruction
genymotion-call
spring-remoting
clickbank
isqlquery
observium
flex++
process-explorer
preload
robotlegs
idn
rmiregistry
cuda-gdb
predicatebuilder
ilasm
box2d-iphone
convention
android-holo-everywhere
unattended-processing
instantiationexception
facebook-iframe
binomial-heap
zend-rest
data-mapping
wcf-instancing
lobo-cobra
tui
sun

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App