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