forked from hazuki0x0/YuzuBrowser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
142 lines (125 loc) · 4.54 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
/*
* Copyright (C) 2017-2019 Hazuki
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'io.fabric'
apply plugin: 'com.cookpad.android.licensetools'
def gitHash = 'git rev-parse --short HEAD'.execute([], project.rootDir).text.trim()
def buildTime = new Date().format("yyyy-MM-dd'T'HH:mm:ssXXX")
android {
compileSdkVersion Build.compile_sdk_version
buildToolsVersion Build.build_tools_version
defaultConfig {
applicationId "jp.hazuki.yuzubrowser"
minSdkVersion Build.min_sdk_version
targetSdkVersion Build.target_sdk_version
versionCode AppVersions.version_code
versionName AppVersions.version_name
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
buildConfigField "String", "GIT_HASH", "\"${gitHash}\""
buildConfigField "String", "BUILD_TIME", "\"${buildTime}\""
resValue "string", "package_name", applicationId
resValue "string", "package_build", gitHash
resValue "string", "package_build_time", buildTime
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
lintOptions {
disable 'MissingTranslation', 'GoogleAppIndexingWarning', 'ClickableViewAccessibility'
}
}
debug {
ext.enableCrashlytics = false
ext.alwaysUpdateBuildId = false
applicationIdSuffix ".debug"
resValue "string", "package_name", "${defaultConfig.applicationId}.debug"
}
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/CHANGES'
exclude 'META-INF/README.md'
}
applicationVariants.all { variant ->
if (variant.buildType.name == "release") {
variant.outputs.each { output ->
if (output.outputFileName.endsWith('.apk')) {
// Rename APK
def applicationId = defaultConfig.applicationId
def versionCode = defaultConfig.versionCode
def versionName = defaultConfig.versionName
output.outputFileName = "${applicationId}_v${versionName}_${versionCode}.apk"
}
}
}
}
}
androidExtensions {
experimental = true
}
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
jcenter()
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
classpath 'com.cookpad.android.licensetools:license-tools-plugin:1.6.0'
}
}
repositories {
maven { url 'https://maven.fabric.io/public' }
maven { url 'https://jitpack.io' }
mavenCentral()
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation Libs.junit
androidTestImplementation Libs.espressoCore
implementation Libs.kotshi
kapt Libs.kotshi_compiler
implementation Libs.okhttp
implementation Libs.support_appcompat_v7
implementation Libs.support_fix_preference
implementation ('com.crashlytics.sdk.android:crashlytics:2.9.9@aar') {
transitive = true
}
implementation project(':browser')
implementation project(':ui')
implementation project(':legacy')
implementation project(':core')
implementation project(':webview')
implementation project(':languages')
implementation project(':favicon')
implementation project(':download')
implementation Libs.kotlin_stdlib
implementation Libs.dagger2
annotationProcessor Libs.dagger2_compiler
kapt Libs.dagger2_compiler
implementation Libs.dagger_android
implementation Libs.dagger_android_support
kapt Libs.dagger_android_processor
implementation Libs.kvs_schema
}