How to add a sepatate source file with cppFlags?

62 views
Skip to first unread message

Lev Popovich

unread,
Sep 28, 2015, 2:56:10 PM9/28/15
to adt-dev
There are a lot of examples with adding a whole source folder to paths like a 
cppFlags += "-I${file("src/main/jni/native_app_glue")}".toString()
in new experimental gradle plugin for AS 1.3+

Is there a way to add single source file to it?

Alex Cohn

unread,
Oct 6, 2015, 4:43:55 PM10/6/15
to adt-dev
This can be avoided by using hybrid Android.mk + grade plugin approach as demonstrated for define LOCAL_SRC_FILES in ndk{} DSL.

Enjoy,
Alex

Alex Cohn

unread,
Oct 8, 2015, 8:51:29 AM10/8/15
to adt-dev
For the older plugin, it was possible: Link individual native source file to Android Studio project - but this workaround is not working with the experimental.

On Monday, September 28, 2015 at 9:56:10 PM UTC+3, Lev Popovich wrote:

Lev Popovich

unread,
Jan 19, 2016, 1:35:26 AM1/19/16
to adt-dev
Will I have an ability to debug c++ code with this approach?

среда, 7 октября 2015 г., 2:43:55 UTC+6 пользователь Alex Cohn написал:

Alex Cohn

unread,
Jan 19, 2016, 2:19:46 AM1/19/16
to adt...@googlegroups.com
> Will I have an ability to debug c++ code with this approach?

Yes, you will. Actually, the new version of experimental plugin gives you even more power, so now it is almost always possible to migrate completely from `ndk-build`.

Happy coding,
Alex

--
You received this message because you are subscribed to a topic in the Google Groups "adt-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adt-dev/qFoFj0BZo4M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adt-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages