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