-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathbuild.gradle
100 lines (79 loc) · 3.11 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
89
90
91
92
93
94
95
96
97
98
99
100
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.7.10'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
maven {
name 'ossrh-snapshot'
url 'https://oss.sonatype.org/content/repositories/snapshots'
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
ext {
ksp_version = '1.7.10-1.0.6'
// publish credentials
if (file("private.properties").exists()) {
Properties props = new Properties()
props.load(new FileInputStream(file("private.properties")))
BINTRAY_KEY = props.getProperty('BINTRAY_KEY')
BINTRAY_USER = props.getProperty('BINTRAY_USER')
NEXUS_USER = props.getProperty('NEXUS_USER')
NEXUS_PASS = props.getProperty('NEXUS_PASS')
GPG_KEY_ID = props.getProperty('GPG_KEY_ID')
GPG_KEY_PASS = props.getProperty('GPG_KEY_PASS')
GPG_KEY_FILE = props.getProperty('GPG_KEY_FILE')
} else {
BINTRAY_KEY = ""
BINTRAY_USER = ""
}
// Compile Settings
COMPILE_SDK = 31
BUILD_TOOLS = '32.0.0'
VERSION_NAME = version()
VERSION_CODE = versionCode().toInteger()
DEVBRICKS_X_VERSION = '1.6.6'
TENSORFLOW_LITEX_VERSION = version()
ROOM_VERSION = '2.4.2'
// Publishing Parameters
SITE_URL = 'https://github.com/dailystudio/tensorflow-lite-examples-android/tree/master/tensorflow-litex'
SCM_URL = 'https://github.com/dailystudio/tensorflow-lite-examples-android.git'
SCM_CONNECTION = 'scm:git@github.com:dailystudio/tensorflow-lite-examples-android.git'
SCM_DEV_CONNECTION = 'scm:git@github.com:dailystudio/tensorflow-lite-examples-android.git'
GROUP_NAME = 'cn.dailystudio'
DESCRIPTION = 'Provide facilities commonly used in TensorFlow Lite development on Android platform.'
DEVELOPER_ID = 'dailystudio'
DEVELOPER_NAME = 'dailystudio'
DEVELOPER_EMAIL = 'dailystudio2020@gmail.com'
LICENCE_NAME = 'The Apache Software License, Version 2.0'
LICENCE_URL = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
RELEASE_REPOSITORY_URL = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
}
def String version() {
def versionPropsFile = file('version.properties')
def Properties versionProps = new Properties()
versionProps.load(new FileInputStream(versionPropsFile))
return versionProps['major'] + "." + versionProps['minor'] + "." + versionProps['patch']
}
def String versionCode() {
def versionPropsFile = file('version.properties')
def Properties versionProps = new Properties()
versionProps.load(new FileInputStream(versionPropsFile))
return versionProps['code']
}