on work/style help sign in
Multigram/build.gradle
52 lines 2.0 kB history raw
1// Top-level build file where you can add configuration options common to all sub-projects/modules.
2buildscript {
3 ext.kotlin_version = '2.4.10'
4 repositories {
5 mavenCentral()
6 google()
7 }
8 dependencies {
9 classpath 'com.android.tools.build:gradle:8.13.2'
10 classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 }
13repositories {
14 google()
17// Strip JLatexMath fonts we don't ship (transitive AAR assets from
18// io.noties.markwon:ext-latex -> ru.noties:jlatexmath-android, ~764 KB total under
19// assets/org/scilab/forge/jlatexmath/fonts/). Has to live in the APK modules — a
20// library's androidResources.ignoreAssetsPattern doesn't filter packaging in apps
21// that consume it. Using subprojects keeps it in one place.
22// keep: base/, latin/, maths/, euler/ (\mathbb, \mathcal, \mathfrak still work)
23// drop: latin/optional/, maths/optional/ (~290 KB; \textbf/\textit/\mathds fall back)
24// licences/ (~20 KB; pure license text files)
25subprojects {
26 plugins.withId('com.android.application') {
27 android {
28 androidResources {
29 ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~:!optional:!licences:!*stmary*:!*eufb*'
30 }
31 }
32 }
34 if (project.projectDir.absolutePath.contains('/TMessagesProj_Modules/media/')) {
35 project.plugins.withId('com.android.library') {
36 project.android {
37 if (namespace == null) {
38 def manifestFile = file("${project.projectDir}/src/main/AndroidManifest.xml")
40 if (manifestFile.exists()) {
41 def manifest = new XmlSlurper().parse(manifestFile)
42 def manifestPackage = manifest.@package.text()
44 if (manifestPackage) {
45 namespace manifestPackage
46 }
47 }
48 }
49 }
50 }
51 }