Class: Loica::Build::Platforms::Android
- Inherits:
-
Loica::Build::Platform
- Object
- Loica::Build::Platform
- Loica::Build::Platforms::Android
- Defined in:
- lib/loica/build/platforms/android.rb
Constant Summary collapse
- ANDROID_NDK =
'/usr/local/opt/android-ndk'- ABIS =
[ %w{ arm64-v8a arm }, %w{ armeabi arm }, %w{ armeabi-v7a arm }, %w{ mips mips }, %w{ mips64 mips }, %w{ x86 x86 }, %w{ x86_64 x86 }
Instance Method Summary collapse
Methods inherited from Loica::Build::Platform
Instance Method Details
#crosbuilds_for(target) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/loica/build/platforms/android.rb', line 19 def crosbuilds_for(target) ENV['ANDROID_NDK_HOME'] = ANDROID_NDK ENV['GCC_VERSION'] = '4.9' ABIS.map do |abi, arch| ENV['ANDROID_TARGET_ARCH'] = arch ENV['ANDROID_TARGET_ARCH_ABI'] = abi ::MRuby::CrossBuild.new(File.join(target.name,abi)) do |conf| toolchain :androideabi conf.gem target.root end end end |
#enabled? ⇒ Boolean
15 16 17 |
# File 'lib/loica/build/platforms/android.rb', line 15 def enabled? File.directory?(ANDROID_NDK) end |