I have some project #1 which is library.
E.g. it works with GCM (C2DM) messages and has permissions (my_package.permission.C2D_MESSAGE and others) inside itself manifest file.
I connect project #1 (lib) to project #2 (some app).
Question: Is it possible to automatically activate permissions from project #1 for project #2 ?
Not presently. If “library” means “Android library project”, this may be possible in the future.
However, in your specific case, that will probably never work. Some of the GCM framework classes are going to use the application’s package, regardless of whether the code that uses GCM is in an Android library project or not.