There is an OpenSource Project with a license: GNU Affero General Public License
The question is, if I put advertising from Google Adsense (or any other advertising), I will violate the law (license)?
Answer 1, Authority 100%
None of the GNU licenses does not prohibit commercial use.
But in relation to the project you specified You answered
As Far As I Can Tell You Won’t Be Able to License The Adsense Code under the Agpl, So including it Would Indeed Be a License Violation.
Translation close to text
As far as I can judge, you can not transfer the AdSense code under AGPL, which means its inclusion will be a license violation.
If I understand correctly, to integrate with Adsense, you need to add some code from Google to your project (if it is not so, then the following does not matter).
In order for two pieces of the code of different authors to merge into one project, the licenses of both pieces should be allowed.
All GNU licenses are “viral”, i.e. Require the final project to be under the same GNU license (or stronger of two, if both GNUs)
So that it makes a license on a second piece of code must be AGPL-compatible.
Google Agpl does not like, as openly declares. All their libraries on GitHub to integrate with Adsense are posted under AGPL incompatible APL V2