| 7 | } |
| 8 | dependencies { |
| 9 | classpath 'com.android.tools.build:gradle:8.13.2' |
| 10 | classpath 'com.google.gms:google-services:4.3.15' |
| 11 | classpath 'com.huawei.agconnect:agcp:1.9.1.301' |
| 12 | classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.0' |
| 13 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:2.1.0" |
| 14 | } |
| 15 | } |
| 16 | repositories { |
| 17 | google() |
| 18 | } |
| 19 |
| 20 | // Strip JLatexMath fonts we don't ship (transitive AAR assets from |
| 21 | // io.noties.markwon:ext-latex -> ru.noties:jlatexmath-android, ~764 KB total under |
| 22 | // assets/org/scilab/forge/jlatexmath/fonts/). Has to live in the APK modules — a |
| 23 | // library's androidResources.ignoreAssetsPattern doesn't filter packaging in apps |
| 24 | // that consume it. Using subprojects keeps it in one place. |
| 25 | // keep: base/, latin/, maths/, euler/ (\mathbb, \mathcal, \mathfrak still work) |
| 26 | // drop: latin/optional/, maths/optional/ (~290 KB; \textbf/\textit/\mathds fall back) |
| 27 | // licences/ (~20 KB; pure license text files) |
| 28 | subprojects { |
| 29 | plugins.withId('com.android.application') { |
| 30 | android { |
| 31 | androidResources { |
| 32 | ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~:!optional:!licences:!*stmary*:!*eufb*' |
| 33 | } |
| 34 | } |
| 35 | } |
| 36 |
| 37 | if (project.projectDir.absolutePath.contains('/TMessagesProj_Modules/media/')) { |
| 38 | project.plugins.withId('com.android.library') { |
| 39 | project.android { |
| 40 | if (namespace == null) { |
| 41 | def manifestFile = file("${project.projectDir}/src/main/AndroidManifest.xml") |
| 42 |
| 43 | if (manifestFile.exists()) { |
| 44 | def manifest = new XmlSlurper().parse(manifestFile) |
| 45 | def manifestPackage = manifest.@package.text() |
| 46 |
| 47 | if (manifestPackage) { |
| 48 | namespace manifestPackage |
| 49 | } |
| 50 | } |
| 51 | } |
| 52 | } |
| 53 | } |
| 54 | } |
| 55 | } |