-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (30 loc) · 1.03 KB
/
Makefile
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
PRODUCT_NAME := kmm-template
PACKAGE := in.surajsau.jisho
# for unit test
PLATFORM_IOS := iOS Simulator,name=iPhone 14 Pro
FLAVOR ?= debug
.PHONY: setup
setup: # setup project dependencies if any
@make setup-node
@make generate-templates
.PHONY: clean
clean: # clean build
rm -rf iosApp/build
./gradlew clean
.PHONY: ios-build
ios-build: # generate {module}.xcframework to be shared in iosApp and move it to iosApp/build folder
./gradlew shared:assembleXCFramework
mkdir -p "iosApp/build"
cp -r "shared/build/XCFrameworks/$(FLAVOR)/shared.xcframework" "iosApp/build"
.PHONY: test-%
test-%: # run unit tests for core module
./gradlew :core:$(*):test
./gradlew :core:$(*):iosX64Test
.PHONY: create-module
create-module: # create new module
node -e 'require("./tools/generate_module").generateModule()'
setup-node: # setup nodejs
brew list node || brew install node
npm install
generate-templates: # generate /tools/templates/generated with given PACKAGE
node -e 'require("./tools/generate_templates").generateTemplateFolder("$(PACKAGE)")'