/
CpuArch.kt
52 lines (45 loc) · 1.22 KB
/
CpuArch.kt
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
/*
* This file is part of AndroidIDE.
*
* AndroidIDE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* AndroidIDE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with AndroidIDE. If not, see <https://www.gnu.org/licenses/>.
*/
package com.itsaky.androidide.app.configuration
/**
* Enum for supported CPU architectures.
*
* @author Akash Yadav
*/
enum class CpuArch(val abi: String) {
/**
* `arm64-v8a` (64-bit).
*/
AARCH64("arm64-v8a"),
/**
* `x86_64` (64-bit).
*/
X86_64("x86_64"),
/**
* `armeabi-v7a` flavor (32-bit).
*/
ARM("armeabi-v7a");
companion object {
/**
* Get the [CpuArch] for the given ABI.
*/
@JvmStatic
fun forAbi(abi: String): CpuArch? {
return entries.firstOrNull { it.abi == abi }
}
}
}