-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
88 lines (74 loc) · 3.01 KB
/
build.gradle
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
def ndkVersionProp = properties.getProperty('ndk.version')
def targetsString = properties.getProperty('ndk.targets')
def profileProp = properties.getProperty('ndk.profile')
def targetsProp = targetsString == null ? null : new ArrayList<>(Arrays.asList(targetsString.split(",")))
def DEFAULT_NDK_VERSION = '25.1.8937393'
def DEFAULT_NDK_PROFILE = 'release'
def DEFAULT_NDK_TARGETS = ["arm", "x86", "arm64", "x86_64"]
def usrProp = properties.getProperty('gh.usr')
def keyProp = properties.getProperty('gh.key')
ext {
compileSdkVersion = 34
minSdkVersion = 24
targetSdkVersion = 34
ndkVersion = ndkVersionProp == null ? DEFAULT_NDK_VERSION : ndkVersionProp
rustNdkProfile = profileProp == null ? DEFAULT_NDK_PROFILE : profileProp
rustNdkTargets = targetsProp == null ? DEFAULT_NDK_TARGETS : targetsProp
usr = usrProp
key = keyProp
javaVersion = JavaVersion.VERSION_1_8
javaTarget = '1.8'
navVersion = '2.7.4'
composeVersion = '1.5.3'
kotlinxVersion = '1.6.4'
tesseractVersion = '0.5.6'
}
}
plugins {
id 'com.android.application' version '8.1.2' apply false
id 'com.android.library' version '8.1.2' apply false
id 'org.jetbrains.kotlin.jvm' version '1.9.10' apply false
id 'org.jetbrains.kotlin.android' version '1.9.10' apply false
id "org.mozilla.rust-android-gradle.rust-android" version "0.9.3" apply false
}
task clean(type: Delete) {
delete rootProject.buildDir
}
allprojects {
group 'one.tesseract'
}
def publishTesseract = tasks.register("tesseract-publish")
subprojects {
afterEvaluate { Project project ->
if(!project.path.contains("crabdroid") &&
!project.path.contains("examples") &&
project.name != "java") {
if(!project.path.contains("detached-activity")) {
publishTesseract.get().dependsOn(project.tasks.named("publish"))
}
project.afterEvaluate {
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/tesseract-one/Tesseract.android")
credentials {
username = rootProject.ext.usr ?: System.getenv("USERNAME")
password = rootProject.ext.key ?: System.getenv("TOKEN")
}
}
}
publications {
gpr(MavenPublication) {
from(components.release)
}
}
}
}
}
}
}