summaryrefslogtreecommitdiff
path: root/src/android/app/build.gradle
diff options
context:
space:
mode:
Diffstat (limited to 'src/android/app/build.gradle')
-rw-r--r--src/android/app/build.gradle190
1 files changed, 0 insertions, 190 deletions
diff --git a/src/android/app/build.gradle b/src/android/app/build.gradle
deleted file mode 100644
index 09ca9c26f..000000000
--- a/src/android/app/build.gradle
+++ /dev/null
@@ -1,190 +0,0 @@
1plugins {
2 id 'com.android.application'
3 id 'org.jetbrains.kotlin.android'
4 id 'kotlin-parcelize'
5}
6
7/**
8 * Use the number of seconds/10 since Jan 1 2016 as the versionCode.
9 * This lets us upload a new build at most every 10 seconds for the
10 * next 680 years.
11 */
12def autoVersion = (int) (((new Date().getTime() / 1000) - 1451606400) / 10)
13def buildType
14
15android {
16 namespace 'org.yuzu.yuzu_emu'
17
18 compileSdkVersion 33
19 ndkVersion "25.2.9519653"
20
21 viewBinding.enabled = true
22
23 compileOptions {
24 sourceCompatibility JavaVersion.VERSION_11
25 targetCompatibility JavaVersion.VERSION_11
26 }
27
28 kotlinOptions {
29 jvmTarget = '11'
30 }
31
32 lint {
33 // This is important as it will run lint but not abort on error
34 // Lint has some overly obnoxious "errors" that should really be warnings
35 abortOnError false
36
37 //Uncomment disable lines for test builds...
38 //disable 'MissingTranslation'bin
39 //disable 'ExtraTranslation'
40 }
41
42 defaultConfig {
43 // TODO If this is ever modified, change application_id in strings.xml
44 applicationId "org.yuzu.yuzu_emu"
45 minSdkVersion 28
46 targetSdkVersion 33
47 versionCode autoVersion
48 versionName getVersion()
49 ndk.abiFilters "arm64-v8a", "x86_64"
50
51 buildConfigField "String", "GIT_HASH", "\"${getGitHash()}\""
52 buildConfigField "String", "BRANCH", "\"${getBranch()}\""
53 }
54
55 signingConfigs {
56 //release {
57 // storeFile file('')
58 // storePassword System.getenv('ANDROID_KEYPASS')
59 // keyAlias = 'key0'
60 // keyPassword System.getenv('ANDROID_KEYPASS')
61 //}
62 }
63
64 applicationVariants.all { variant ->
65 buildType = variant.buildType.name // sets the current build type
66 }
67
68 // Define build types, which are orthogonal to product flavors.
69 buildTypes {
70
71 // Signed by release key, allowing for upload to Play Store.
72 release {
73 signingConfig signingConfigs.debug
74 }
75
76 // builds a release build that doesn't need signing
77 // Attaches 'debug' suffix to version and package name, allowing installation alongside the release build.
78 relWithDebInfo {
79 initWith release
80 versionNameSuffix '-debug'
81 signingConfig signingConfigs.debug
82 minifyEnabled false
83 testCoverageEnabled false
84 debuggable true
85 jniDebuggable true
86 }
87
88 // Signed by debug key disallowing distribution on Play Store.
89 // Attaches 'debug' suffix to version and package name, allowing installation alongside the release build.
90 debug {
91 // TODO If this is ever modified, change application_id in debug/strings.xml
92 versionNameSuffix '-debug'
93 debuggable true
94 jniDebuggable true
95 }
96 }
97
98 flavorDimensions "version"
99 productFlavors {
100 mainline {
101 dimension "version"
102 }
103 }
104
105 externalNativeBuild {
106 cmake {
107 version "3.22.1"
108 path "../../../CMakeLists.txt"
109 }
110 }
111
112 defaultConfig {
113 externalNativeBuild {
114 cmake {
115 arguments "-DENABLE_QT=0", // Don't use QT
116 "-DENABLE_SDL2=0", // Don't use SDL
117 "-DENABLE_WEB_SERVICE=0", // Don't use telemetry
118 "-DBUNDLE_SPEEX=ON",
119 "-DANDROID_ARM_NEON=true", // cryptopp requires Neon to work
120 "-DYUZU_USE_BUNDLED_VCPKG=ON",
121 "-DYUZU_USE_BUNDLED_FFMPEG=ON"
122
123 abiFilters "arm64-v8a", "x86_64"
124 }
125 }
126 }
127}
128
129dependencies {
130 implementation 'androidx.core:core-ktx:1.9.0'
131 implementation 'androidx.appcompat:appcompat:1.6.1'
132 implementation 'androidx.exifinterface:exifinterface:1.3.6'
133 implementation 'androidx.cardview:cardview:1.0.0'
134 implementation 'androidx.recyclerview:recyclerview:1.2.1'
135 implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
136 implementation 'androidx.lifecycle:lifecycle-viewmodel:2.5.1'
137 implementation 'androidx.fragment:fragment:1.5.5'
138 implementation "androidx.slidingpanelayout:slidingpanelayout:1.2.0"
139 implementation "androidx.documentfile:documentfile:1.0.1"
140 implementation 'com.google.android.material:material:1.8.0'
141 implementation 'androidx.preference:preference:1.2.0'
142 implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1"
143 implementation "io.coil-kt:coil:2.2.2"
144 implementation 'androidx.core:core-splashscreen:1.0.0'
145 implementation 'androidx.window:window:1.0.0'
146 implementation 'org.ini4j:ini4j:0.5.4'
147 implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
148 implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
149}
150
151def getVersion() {
152 def versionName = '0.0'
153
154 try {
155 versionName = 'git describe --always --long'.execute([], project.rootDir).text
156 .trim()
157 .replaceAll(/(-0)?-[^-]+$/, "")
158 } catch (Exception) {
159 logger.error('Cannot find git, defaulting to dummy version number')
160 }
161
162 if (System.getenv("GITHUB_ACTIONS") != null) {
163 def gitTag = System.getenv("GIT_TAG_NAME")
164 versionName = gitTag ?: versionName
165 }
166
167 return versionName
168}
169
170def getGitHash() {
171 try {
172 def gitHash = 'git rev-parse HEAD'.execute([], project.rootDir).text.trim()
173 return gitHash
174 } catch (Exception e) {
175 logger.error(e + ': Cannot find git, defaulting to dummy build hash')
176 }
177
178 return '0'
179}
180
181def getBranch() {
182 try {
183 def branch = 'git rev-parse --abbrev-ref HEAD'.execute([], project.rootDir).text.trim()
184 return branch
185 } catch (Exception e) {
186 logger.error(e + ': Cannot find git, defaulting to dummy branch')
187 }
188
189 return 'main'
190}