loica-build 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.gitmodules +3 -0
- data/.rspec +2 -0
- data/.travis.yml +10 -0
- data/Gemfile +6 -0
- data/README.md +30 -0
- data/Rakefile +17 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/lib/loica/build.rb +7 -0
- data/lib/loica/build/application.rb +43 -0
- data/lib/loica/build/configuration.rb +85 -0
- data/lib/loica/build/mruby.rb +4 -0
- data/lib/loica/build/mruby/application_gem.rb +32 -0
- data/lib/loica/build/mruby/fragment.rb +9 -0
- data/lib/loica/build/mruby/gem.rb +6 -0
- data/lib/loica/build/mruby/target.rb +9 -0
- data/lib/loica/build/mruby/toolchains/android.rb +0 -0
- data/lib/loica/build/mruby/toolchains/apple.rb +0 -0
- data/lib/loica/build/mruby/toolchains/javascript.rb +0 -0
- data/lib/loica/build/platform.rb +25 -0
- data/lib/loica/build/platforms.rb +4 -0
- data/lib/loica/build/platforms/android.rb +36 -0
- data/lib/loica/build/platforms/apple_ios.rb +42 -0
- data/lib/loica/build/platforms/web.rb +34 -0
- data/lib/loica/build/rake.rb +6 -0
- data/lib/loica/build/rake/application.rake +5 -0
- data/lib/loica/build/rake/mruby.rake +10 -0
- data/lib/loica/build/rake/mruby_config.rake +16 -0
- data/lib/loica/build/rake/targets.rake +1 -0
- data/lib/loica/build/target.rb +52 -0
- data/lib/loica/build/version.rb +7 -0
- data/loica-build.gemspec +25 -0
- metadata +118 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 668bff20bf0533401b22b19023f871ae7dbaa08c
|
|
4
|
+
data.tar.gz: e0026bb2a897bcea41af0074ae132de25678a03e
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 2943b969aa8cc7ca7646f68cf933ee07056c99a8959bd4281397518870e25f9d0614765eafc6eed13e402cbf554db6860b9596eda7280018d33b293d8770cd22
|
|
7
|
+
data.tar.gz: af3e2420e66bc27067c802c5040b7aadffa8cb8921e691e2244fa553109f906a0a8e97e3ee52a7e9abf991b7a05722c51f5407225bc42ddc6d01331dee7674c3
|
data/.gitignore
ADDED
data/.gitmodules
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Loica framework build toolchain
|
|
2
|
+
|
|
3
|
+
[![Gem Version][gem-badge]][gem-url]
|
|
4
|
+
[![Build Status][ci-badge]][ci-url]
|
|
5
|
+
[![Dependency Status][dependencies-badge]][dependencies-url]
|
|
6
|
+
[![Code Quality][codequality-badge]][codequality-url]
|
|
7
|
+
[![Test Coverage][testcoverage-badge]][testcoverage-url]
|
|
8
|
+
[![Inline docs][docscoverage-badge]][docscoverage-url]
|
|
9
|
+
|
|
10
|
+
Crossbuild MRuby apps to multiple targets.
|
|
11
|
+
|
|
12
|
+
## Status: Experimental
|
|
13
|
+
Right now this is an experimental work so it's API is very likely to change.
|
|
14
|
+
|
|
15
|
+
## Contributing
|
|
16
|
+
|
|
17
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/loicarb/loica-build/issues.
|
|
18
|
+
|
|
19
|
+
[gem-url]: https://rubygems.org/gems/loica-build
|
|
20
|
+
[gem-badge]: https://badge.fury.io/rb/rom-repository.svg
|
|
21
|
+
[ci-url]: https://travis-ci.org/loicarb/loica-build
|
|
22
|
+
[ci-badge]: https://travis-ci.org/loicarb/loica-build.svg?branch=master
|
|
23
|
+
[codequality-url]: https://codeclimate.com/github/loicarb/loica-build
|
|
24
|
+
[codequality-badge]: https://codeclimate.com/github/loicarb/loica-build/badges/gpa.svg
|
|
25
|
+
[testcoverage-url]: https://codeclimate.com/github/loicarb/loica-build/coverage
|
|
26
|
+
[testcoverage-badge]: https://codeclimate.com/github/loicarb/loica-build/badges/coverage.svg
|
|
27
|
+
[docscoverage-url]: http://inch-ci.org/github/loicarb/loica-build
|
|
28
|
+
[docscoverage-badge]: http://inch-ci.org/github/loicarb/loica-build.svg?branch=master
|
|
29
|
+
[dependencies-url]: https://gemnasium.com/loicarb/loica-build
|
|
30
|
+
[dependencies-badge]: https://gemnasium.com/loicarb/loica-build.svg
|
data/Rakefile
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
require "bundler/gem_tasks"
|
|
2
|
+
require "rspec/core/rake_task"
|
|
3
|
+
|
|
4
|
+
RSpec::Core::RakeTask.new(:spec)
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
namespace :sample do
|
|
8
|
+
desc "Build the sample project"
|
|
9
|
+
task :build do
|
|
10
|
+
Dir.chdir("sample") do
|
|
11
|
+
ruby "-S", "rake"
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
task :default => :spec
|
|
17
|
+
task :ci => [:spec, 'sample:build']
|
data/bin/console
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
require "bundler/setup"
|
|
4
|
+
require "loica/build"
|
|
5
|
+
|
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
|
8
|
+
|
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
|
10
|
+
# require "pry"
|
|
11
|
+
# Pry.start
|
|
12
|
+
|
|
13
|
+
require "irb"
|
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
data/lib/loica/build.rb
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
module Loica::Build # :nodoc:
|
|
2
|
+
|
|
3
|
+
# This represents the application being loaded
|
|
4
|
+
# its loaded typically from `application.rb` on the current folder
|
|
5
|
+
# and holds the application configuration
|
|
6
|
+
class Application < Configuration
|
|
7
|
+
|
|
8
|
+
# Path component where application targets reside
|
|
9
|
+
TARGETS_DIRECTORY = 'targets'
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
# Path where the application's targets reside
|
|
13
|
+
#
|
|
14
|
+
# @return [Pathname] the path
|
|
15
|
+
def targets_path
|
|
16
|
+
self.root.join(TARGETS_DIRECTORY)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
# Loads a target with the given name
|
|
20
|
+
#
|
|
21
|
+
# @param name [String] the target name
|
|
22
|
+
# @return [Loica::Build::Target] the loaded target
|
|
23
|
+
def target(name)
|
|
24
|
+
Target.load_from(self.targets_path.join(name,'target.rake')).tap do |target|
|
|
25
|
+
target.application = self
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Returns all the application targets
|
|
30
|
+
#
|
|
31
|
+
# @return [Array<Loica::Build::Target>] the targets
|
|
32
|
+
def targets
|
|
33
|
+
@targets ||= targets_path.children.map do |target|
|
|
34
|
+
begin
|
|
35
|
+
self.target(target.basename)
|
|
36
|
+
rescue Target::FileNotFoundError
|
|
37
|
+
nil
|
|
38
|
+
end
|
|
39
|
+
end.compact
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
module Loica::Build
|
|
2
|
+
# Represent's a configuration base object
|
|
3
|
+
# @abstract
|
|
4
|
+
class Configuration
|
|
5
|
+
# Generic configuration error
|
|
6
|
+
Error = Class.new(RuntimeError)
|
|
7
|
+
|
|
8
|
+
# The file provided was not found
|
|
9
|
+
FileNotFoundError = Class.new(Error)
|
|
10
|
+
|
|
11
|
+
# The file loaded didn't returned an object form the expected type
|
|
12
|
+
TypeError = Class.new(Error)
|
|
13
|
+
|
|
14
|
+
# Raised when the configuration root path is unknown
|
|
15
|
+
RootPathUnknownError = Class.new(Error)
|
|
16
|
+
|
|
17
|
+
def initialize(&block)
|
|
18
|
+
if self.class.loading?
|
|
19
|
+
self.root = File.dirname(self.class.current_file)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
instance_exec(self,&block) if block
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Gets the object root path
|
|
26
|
+
#
|
|
27
|
+
# @return [Pathname] the root path
|
|
28
|
+
def root
|
|
29
|
+
raise RootPathUnknownError unless @root
|
|
30
|
+
@root
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Sets an object root path
|
|
34
|
+
# @see #root
|
|
35
|
+
#
|
|
36
|
+
# @param path [Pathname,String] the new path
|
|
37
|
+
def root=(path)
|
|
38
|
+
@root = Pathname(path)
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
class << self
|
|
42
|
+
# Load an instance of the current class from file
|
|
43
|
+
#
|
|
44
|
+
# @param file [#to_s] the file's path to load
|
|
45
|
+
# @return [self] the instance of the class loaded
|
|
46
|
+
def load_from(file)
|
|
47
|
+
file = String(file)
|
|
48
|
+
|
|
49
|
+
unless File.file? file
|
|
50
|
+
raise FileNotFoundError, "file \"#{file}\" not found"
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
self.current_file = file
|
|
54
|
+
object = eval File.read(file), binding, file
|
|
55
|
+
self.current_file = nil
|
|
56
|
+
|
|
57
|
+
unless object.kind_of? self
|
|
58
|
+
raise TypeError, "expected #{file} to declare a #{self.name} but declared a #{object.class.name}"
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
object
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Tells if a file is currently being loaded
|
|
65
|
+
#
|
|
66
|
+
# @return [Boolean] is a file being loaded?
|
|
67
|
+
def loading?
|
|
68
|
+
!!self.current_file
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Get's the path of the file being currently loaded
|
|
72
|
+
#
|
|
73
|
+
# @return [String,nil] the file being loaded path or nil if nothing is being loaded
|
|
74
|
+
def current_file
|
|
75
|
+
Thread.current[self.name]
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
protected
|
|
79
|
+
# Set's the file being loaded.
|
|
80
|
+
def current_file=(file)
|
|
81
|
+
Thread.current[self.name] = file
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
module Loica::Build
|
|
2
|
+
module MRuby
|
|
3
|
+
class ApplicationGem < Gem
|
|
4
|
+
def initialize(&block)
|
|
5
|
+
super(nil,&block)
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
def fragment(fragment_name)
|
|
9
|
+
path = File.expand_path("fragments/#{fragment_name}", Dir.pwd)
|
|
10
|
+
self.add_dependency("fragment-#{fragment_name}", path: path)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def name
|
|
14
|
+
raise NotImplementedError
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def dir_name
|
|
18
|
+
File.basename(self.dir)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def setup
|
|
22
|
+
self.name # Here to raise error if name's not defined
|
|
23
|
+
|
|
24
|
+
self.licenses = 'Private'
|
|
25
|
+
self.authors = 'Application developers'
|
|
26
|
+
|
|
27
|
+
super
|
|
28
|
+
end
|
|
29
|
+
end # class ApplicationGem
|
|
30
|
+
end # module MRuby
|
|
31
|
+
end # module Loica::Build
|
|
32
|
+
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# This class is cool
|
|
2
|
+
# @abstract
|
|
3
|
+
module Loica::Build # :nodoc:
|
|
4
|
+
class Platform
|
|
5
|
+
|
|
6
|
+
def crosbuilds_for(target)
|
|
7
|
+
raise NotImplementedError
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def enabled?
|
|
11
|
+
false
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
class << self
|
|
15
|
+
def build(platform)
|
|
16
|
+
case platform
|
|
17
|
+
when Symbol, String then Platforms.const_get(platform).new
|
|
18
|
+
when Class then platform.new
|
|
19
|
+
else
|
|
20
|
+
platform
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
module Loica::Build
|
|
2
|
+
module Platforms
|
|
3
|
+
class Android < Platform
|
|
4
|
+
ANDROID_NDK = '/usr/local/opt/android-ndk'
|
|
5
|
+
ABIS = [
|
|
6
|
+
%w{ arm64-v8a arm },
|
|
7
|
+
%w{ armeabi arm },
|
|
8
|
+
%w{ armeabi-v7a arm },
|
|
9
|
+
%w{ mips mips },
|
|
10
|
+
%w{ mips64 mips },
|
|
11
|
+
%w{ x86 x86 },
|
|
12
|
+
%w{ x86_64 x86 }
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
def enabled?
|
|
16
|
+
File.directory?(ANDROID_NDK)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def crosbuilds_for(target)
|
|
20
|
+
ENV['ANDROID_NDK_HOME'] = ANDROID_NDK
|
|
21
|
+
ENV['GCC_VERSION'] = '4.9'
|
|
22
|
+
|
|
23
|
+
ABIS.map do |abi, arch|
|
|
24
|
+
ENV['ANDROID_TARGET_ARCH'] = arch
|
|
25
|
+
ENV['ANDROID_TARGET_ARCH_ABI'] = abi
|
|
26
|
+
|
|
27
|
+
::MRuby::CrossBuild.new(File.join(target.name,abi)) do |conf|
|
|
28
|
+
toolchain :androideabi
|
|
29
|
+
|
|
30
|
+
conf.gem target.root
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
module Loica::Build
|
|
2
|
+
module Platforms
|
|
3
|
+
class AppleiOS < Platform
|
|
4
|
+
MIN_IOS_VERSION = 4.3
|
|
5
|
+
XCODE_PATH = `xcode-select -print-path`.chomp rescue nil
|
|
6
|
+
|
|
7
|
+
def enabled?
|
|
8
|
+
!!XCODE_PATH
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def crosbuilds_for(target)
|
|
13
|
+
[
|
|
14
|
+
# Device
|
|
15
|
+
::MRuby::CrossBuild.new(File.join(target.name,'devise')) do |conf|
|
|
16
|
+
toolchain :clang
|
|
17
|
+
|
|
18
|
+
[conf.cc, conf.cxx, conf.objc].each do |cc|
|
|
19
|
+
cc.command = XCODE_PATH + '/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang'
|
|
20
|
+
%w{armv7 armv7s arm64}.each do |arch|
|
|
21
|
+
cc.flags << %Q[-arch #{arch}]
|
|
22
|
+
end
|
|
23
|
+
cc.flags << %Q[-miphoneos-version-min=#{MIN_IOS_VERSION}]
|
|
24
|
+
cc.flags << %Q[-isysroot "#{XCODE_PATH}/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk"]
|
|
25
|
+
cc.flags << %Q[-fmessage-length=0 -std=gnu99 -fpascal-strings -fexceptions -fasm-blocks -gdwarf-2]
|
|
26
|
+
cc.flags << %Q[-fobjc-abi-version=2]
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
conf.linker.command = XCODE_PATH + '/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld'
|
|
30
|
+
conf.archiver.command = XCODE_PATH + '/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool'
|
|
31
|
+
conf.archiver.archive_options = '-o %{outfile} %{objs}'
|
|
32
|
+
|
|
33
|
+
conf.gem target.root
|
|
34
|
+
end
|
|
35
|
+
# TODO: Simulator build
|
|
36
|
+
# ::MRuby::CrossBuild.new(File.join(target.name,'Simulator')) do |conf|
|
|
37
|
+
# end
|
|
38
|
+
]
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
module Loica::Build
|
|
2
|
+
module Platforms
|
|
3
|
+
class Web < Platform
|
|
4
|
+
# TODO: Dynamic lookup of EMSCRIPTEN_DIR
|
|
5
|
+
EMSCRIPTEN_DIR = '/usr/local/opt/emscripten'
|
|
6
|
+
EMCC = File.join(EMSCRIPTEN_DIR, 'bin', 'emcc')
|
|
7
|
+
EMXX = File.join(EMSCRIPTEN_DIR, 'bin', 'em++')
|
|
8
|
+
EMLD = File.join(EMSCRIPTEN_DIR, 'bin', 'emcc')
|
|
9
|
+
EMAR = File.join(EMSCRIPTEN_DIR, 'bin', 'emar')
|
|
10
|
+
|
|
11
|
+
def enabled?
|
|
12
|
+
File.directory?(EMSCRIPTEN_DIR)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def crosbuilds_for(target)
|
|
16
|
+
[
|
|
17
|
+
::MRuby::CrossBuild.new(target.name) do |conf|
|
|
18
|
+
toolchain :clang
|
|
19
|
+
|
|
20
|
+
conf.cc do |cc|
|
|
21
|
+
cc.command = EMCC
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
conf.cxx.command = EMLD
|
|
25
|
+
conf.linker.command = EMLD
|
|
26
|
+
conf.archiver.command = EMAR
|
|
27
|
+
|
|
28
|
+
conf.gem target.root
|
|
29
|
+
end
|
|
30
|
+
]
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Set some ENV variables for MRuby
|
|
2
|
+
|
|
3
|
+
## Build MRuby targets in ./build/mruby
|
|
4
|
+
ENV['MRUBY_BUILD_DIR'] = CURRENT_APPLICATION.root.join('build', 'mruby').to_s
|
|
5
|
+
|
|
6
|
+
## MRuby Targets config
|
|
7
|
+
ENV['MRUBY_CONFIG'] = File.expand_path('../mruby_config.rake', __FILE__)
|
|
8
|
+
|
|
9
|
+
# load MRuby's Rakefile
|
|
10
|
+
load File.expand_path('../../../../../vendor/mruby/Rakefile', __FILE__)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
require 'loica/build/mruby'
|
|
2
|
+
|
|
3
|
+
# host MRuby build
|
|
4
|
+
MRuby::Build.new do |conf|
|
|
5
|
+
toolchain :gcc
|
|
6
|
+
|
|
7
|
+
enable_debug
|
|
8
|
+
|
|
9
|
+
# include the default GEMs
|
|
10
|
+
conf.gembox 'default'
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
# Setup MRuby crossbuilds for each target
|
|
14
|
+
CURRENT_APPLICATION.targets.each do |target|
|
|
15
|
+
target.crossbuilds if target.enabled?
|
|
16
|
+
end
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# TODO: Aditional rake setup per application target
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
module Loica::Build # :nodoc:
|
|
2
|
+
|
|
3
|
+
# This represent's an application target build
|
|
4
|
+
class Target < Configuration
|
|
5
|
+
|
|
6
|
+
# Raised when the target's application is unknown
|
|
7
|
+
ApplicationUnknownError = Class.new(Error)
|
|
8
|
+
|
|
9
|
+
# Raised when the target's platform is unknown
|
|
10
|
+
PlatformUnknownError = Class.new(Error)
|
|
11
|
+
|
|
12
|
+
# The target's application
|
|
13
|
+
#
|
|
14
|
+
# @return [Loica::Build::Application] the application
|
|
15
|
+
def application
|
|
16
|
+
raise ApplicationUnknownError unless @application
|
|
17
|
+
|
|
18
|
+
@application
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# @see #application
|
|
22
|
+
def application=(application)
|
|
23
|
+
@application = application
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# The target's target platform
|
|
27
|
+
#
|
|
28
|
+
# @return [Loica::Build::Platform] the platform
|
|
29
|
+
def platform
|
|
30
|
+
raise PlatformUnknownError unless @platform
|
|
31
|
+
|
|
32
|
+
@platform
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# @see #platform
|
|
36
|
+
def platform=(platform)
|
|
37
|
+
@platform = Platform.build(platform)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def name
|
|
41
|
+
self.root.basename.to_s
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def enabled?
|
|
45
|
+
self.platform.enabled?
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def crossbuilds
|
|
49
|
+
@crossbuilds ||= self.platform.crosbuilds_for(self)
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
data/loica-build.gemspec
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
+
require 'loica/build/version'
|
|
5
|
+
|
|
6
|
+
Gem::Specification.new do |spec|
|
|
7
|
+
spec.name = "loica-build"
|
|
8
|
+
spec.version = Loica::Build::VERSION
|
|
9
|
+
spec.authors = ["Seba Gamboa"]
|
|
10
|
+
spec.email = ["me@sagmor.com"]
|
|
11
|
+
|
|
12
|
+
spec.summary = %q{Loica framework build toolchain}
|
|
13
|
+
spec.description = %q{Crossbuild MRuby apps to multiple targets}
|
|
14
|
+
spec.homepage = "https://github.com/loicarb/loica-build"
|
|
15
|
+
|
|
16
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|sample)/}) }
|
|
17
|
+
spec.bindir = "exe"
|
|
18
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
19
|
+
spec.require_paths = ["lib"]
|
|
20
|
+
|
|
21
|
+
spec.add_dependency "rake", "~> 10.0"
|
|
22
|
+
|
|
23
|
+
spec.add_development_dependency "bundler", "~> 1.10"
|
|
24
|
+
spec.add_development_dependency "rspec"
|
|
25
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: loica-build
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Seba Gamboa
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: exe
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2015-08-20 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: rake
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - "~>"
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '10.0'
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - "~>"
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '10.0'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: bundler
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - "~>"
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '1.10'
|
|
34
|
+
type: :development
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - "~>"
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '1.10'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: rspec
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - ">="
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '0'
|
|
48
|
+
type: :development
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - ">="
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '0'
|
|
55
|
+
description: Crossbuild MRuby apps to multiple targets
|
|
56
|
+
email:
|
|
57
|
+
- me@sagmor.com
|
|
58
|
+
executables: []
|
|
59
|
+
extensions: []
|
|
60
|
+
extra_rdoc_files: []
|
|
61
|
+
files:
|
|
62
|
+
- ".gitignore"
|
|
63
|
+
- ".gitmodules"
|
|
64
|
+
- ".rspec"
|
|
65
|
+
- ".travis.yml"
|
|
66
|
+
- Gemfile
|
|
67
|
+
- README.md
|
|
68
|
+
- Rakefile
|
|
69
|
+
- bin/console
|
|
70
|
+
- bin/setup
|
|
71
|
+
- lib/loica/build.rb
|
|
72
|
+
- lib/loica/build/application.rb
|
|
73
|
+
- lib/loica/build/configuration.rb
|
|
74
|
+
- lib/loica/build/mruby.rb
|
|
75
|
+
- lib/loica/build/mruby/application_gem.rb
|
|
76
|
+
- lib/loica/build/mruby/fragment.rb
|
|
77
|
+
- lib/loica/build/mruby/gem.rb
|
|
78
|
+
- lib/loica/build/mruby/target.rb
|
|
79
|
+
- lib/loica/build/mruby/toolchains/android.rb
|
|
80
|
+
- lib/loica/build/mruby/toolchains/apple.rb
|
|
81
|
+
- lib/loica/build/mruby/toolchains/javascript.rb
|
|
82
|
+
- lib/loica/build/platform.rb
|
|
83
|
+
- lib/loica/build/platforms.rb
|
|
84
|
+
- lib/loica/build/platforms/android.rb
|
|
85
|
+
- lib/loica/build/platforms/apple_ios.rb
|
|
86
|
+
- lib/loica/build/platforms/web.rb
|
|
87
|
+
- lib/loica/build/rake.rb
|
|
88
|
+
- lib/loica/build/rake/application.rake
|
|
89
|
+
- lib/loica/build/rake/mruby.rake
|
|
90
|
+
- lib/loica/build/rake/mruby_config.rake
|
|
91
|
+
- lib/loica/build/rake/targets.rake
|
|
92
|
+
- lib/loica/build/target.rb
|
|
93
|
+
- lib/loica/build/version.rb
|
|
94
|
+
- loica-build.gemspec
|
|
95
|
+
homepage: https://github.com/loicarb/loica-build
|
|
96
|
+
licenses: []
|
|
97
|
+
metadata: {}
|
|
98
|
+
post_install_message:
|
|
99
|
+
rdoc_options: []
|
|
100
|
+
require_paths:
|
|
101
|
+
- lib
|
|
102
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
103
|
+
requirements:
|
|
104
|
+
- - ">="
|
|
105
|
+
- !ruby/object:Gem::Version
|
|
106
|
+
version: '0'
|
|
107
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
|
+
requirements:
|
|
109
|
+
- - ">="
|
|
110
|
+
- !ruby/object:Gem::Version
|
|
111
|
+
version: '0'
|
|
112
|
+
requirements: []
|
|
113
|
+
rubyforge_project:
|
|
114
|
+
rubygems_version: 2.4.5
|
|
115
|
+
signing_key:
|
|
116
|
+
specification_version: 4
|
|
117
|
+
summary: Loica framework build toolchain
|
|
118
|
+
test_files: []
|