forked from oakesville/mythling
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
125 lines (103 loc) · 3.16 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
apply plugin: 'com.android.application'
buildscript {
System.properties['com.android.build.gradle.overrideVersionCheck'] = 'true'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
}
}
repositories {
google()
jcenter()
}
dependencies {
implementation fileTree(include: '*.jar', dir: 'libs')
implementation 'com.android.support:appcompat-v7:24.2.1'
}
android {
compileSdkVersion 24
defaultConfig {
applicationId "com.oakesville.mythling"
minSdkVersion 21
targetSdkVersion 24
versionCode 53
versionName "2.2.02"
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['/assets/']
jniLibs.srcDirs = ['libs']
}
// Move the build types to build-types/<type>
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
// This moves them out of them default location under src/<type>/... which would
// conflict with src/ being used by the main source set.
// Adding new build types or product flavors should be accompanied
// by a similar customization.
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}
dexOptions {
preDexLibraries false
}
lintOptions {
abortOnError false
}
signingConfigs {
release {
storeFile file(System.getenv("OAKESVILLE_KEYSTORE_FILE"))
storePassword System.getenv("OAKESVILLE_KEYSTORE_PASSWORD")
keyAlias System.getenv("OAKESVILLE_KEY_ALIAS")
keyPassword System.getenv("OAKESVILLE_KEY_PASSWORD")
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
useLibrary 'org.apache.http.legacy'
}
task buildMythlingEpg(type: Exec) {
workingDir mythlingEpgLoc
commandLine 'cmd', '/c', 'grunt', '--no-color'
}
task copyEpgDist(type: Copy) {
dependsOn buildMythlingEpg
from("${mythlingEpgLoc}/dist") {
exclude 'demo/'
exclude 'js/mythling-epg.min.js'
exclude 'js/mythling-epg-omb.min.js'
}
into 'assets/mythling-epg'
}
task getMythlingEpg() {
dependsOn copyEpgDist
}
task devCopyJs(type: Copy) {
from("${mythlingEpgLoc}/src") {
include 'epg-device.js'
include 'epg-firetv.js'
}
into 'assets/mythling-epg/js'
}
// Copies epg resources directly from src rather than dist.
// Does not include stuff that needs to be processed by grunt (mythling-epg.js, guide.html)
// Run grunt and then copyEpgDist at least once first.
task devCopyEpg(type: Copy) {
dependsOn devCopyJs
from("${mythlingEpgLoc}") {
include 'views/*'
include 'css/*'
}
into 'assets/mythling-epg'
}