Skip to content

Commit

Permalink
Remove symlinks to shared/gui from app folders :D.
Browse files Browse the repository at this point in the history
  • Loading branch information
saurik committed Dec 20, 2020
1 parent 9f77528 commit 76891ba
Show file tree
Hide file tree
Showing 74 changed files with 228 additions and 337 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,23 @@ on: [push]
jobs:



build-flt-orc:
runs-on: macos-latest

steps:

- uses: actions/checkout@v2
- name: env/setup
run: env/setup.sh
- name: git submodule
run: env/submodule.sh --jobs 3

- name: make skeleton
run: ./app-flutter.sh orchid && cd app-flutter && make



build-ios-app:
runs-on: macos-latest

Expand Down Expand Up @@ -135,7 +152,7 @@ jobs:
run: env/submodule.sh --jobs 3

- name: setup plugins
run: debug=crossndk make -j3 -C app-windows shared/gui/.flutter-plugins
run: debug=crossndk make -j3 -C app-windows ./env/dotdot/gui-orchid/.flutter-plugins
- name: make Windows app
run: make -j3 -C app-windows target=win precache='--no-android --no-ios --windows -a'
- uses: actions/upload-artifact@v1
Expand Down Expand Up @@ -204,7 +221,7 @@ jobs:
run: env/submodule.sh --jobs 3

- name: setup plugins
run: debug=crossndk make -j3 -C app-linux shared/gui/.flutter-plugins
run: debug=crossndk make -j3 -C app-linux ./env/dotdot/gui-orchid/.flutter-plugins
- name: make Linux app
run: debug=crossndk make -j3 -C app-linux precache='--no-android --no-ios --linux'
- uses: actions/upload-artifact@v1
Expand Down
1 change: 0 additions & 1 deletion app-android/.dart_tool

This file was deleted.

1 change: 0 additions & 1 deletion app-android/.flutter-plugins

This file was deleted.

1 change: 0 additions & 1 deletion app-android/.packages

This file was deleted.

1 change: 0 additions & 1 deletion app-android/assets

This file was deleted.

5 changes: 3 additions & 2 deletions app-android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ subprojects {
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

def flutter = files(flutterJar)
def flutter = files(orcFlutter)

android {
compileSdkVersion 29
Expand All @@ -47,6 +47,7 @@ android {

sourceSets {
main {
java.srcDirs += [orcInterface + "/android/app/src/main/java"]
assets.srcDirs += ['out-and/assets']
jniLibs.srcDirs = ['out-and/jnilibs']
}
Expand All @@ -66,7 +67,7 @@ android {
}

import groovy.json.JsonSlurper
def plugins = new JsonSlurper().parseText(new File("shared/gui/.flutter-plugins-dependencies").text)
def plugins = new JsonSlurper().parseText(new File(orcInterface + "/.flutter-plugins-dependencies").text)
plugins.plugins.android.each { dependency ->
def plugin = project.rootProject.findProject(":${dependency.name}")

Expand Down
1 change: 0 additions & 1 deletion app-android/flutter

This file was deleted.

1 change: 0 additions & 1 deletion app-android/glib

This file was deleted.

1 change: 0 additions & 1 deletion app-android/in_app_purchase

This file was deleted.

1 change: 0 additions & 1 deletion app-android/lib

This file was deleted.

8 changes: 4 additions & 4 deletions app-android/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,19 @@ $(output)/assets/flutter_assets/AssetManifest%json: $(output)/flutter/flutter_as
@mkdir -p $(dir $@)
rsync -a --delete $(dir $<) $(dir $@)

flutter/bin/cache/artifacts/engine/android-%-release/flutter.jar: flutter/packages/flutter/pubspec.lock
$(pwd/flutter)/bin/cache/artifacts/engine/android-%-release/flutter.jar: $(pwd/flutter)/packages/flutter/pubspec.lock
@

temp := $(foreach arch,$(jni),$(foreach base,orchid flutter app,$(output)/jnilibs/$(arch)/lib$(base).so))

$(output)/jnilibs/%/libflutter.so: flutter/bin/cache/artifacts/engine/android-$$(flutter/$$*)-release/flutter.jar
$(output)/jnilibs/%/libflutter.so: $(pwd/flutter)/bin/cache/artifacts/engine/android-$$(flutter/$$*)-release/flutter.jar
@mkdir -p $(dir $@)
unzip -p $< lib/$*/libflutter.so >$@

$(apk): $(shell find src/main/kotlin -name '*.kt') $(shell find src/main/java -name '*.java') $(shell find src/main/res) build.gradle src/main/AndroidManifest.xml $(temp) $(subst %,.,$(generated)) $(output)/assets/flutter_assets/AssetManifest.json flutter/bin/cache/artifacts/engine/android-arm-release/flutter.jar
$(apk): $(shell find src/main/kotlin -name '*.kt') $(shell find src/main/java -name '*.java') $(shell find src/main/res) build.gradle src/main/AndroidManifest.xml $(temp) $(subst %,.,$(generated)) $(output)/assets/flutter_assets/AssetManifest.json $(pwd/flutter)/bin/cache/artifacts/engine/android-arm-release/flutter.jar
@gradle -Pandroid.debug.obsoleteApi=true assembleRelease --console verbose --warning-mode all \
-PorcMonotonic='$(monotonic)' -PorcRevision='$(revision)' -PorcPackage='$(package)' -PorcVersion='$(version)' \
-PflutterJar=flutter/bin/cache/artifacts/engine/android-arm-release/flutter.jar
-PorcFlutter=$(pwd/flutter)/bin/cache/artifacts/engine/android-arm-release/flutter.jar -PorcInterface='$(pwd/gui)'
exit 0
touch $@

Expand Down
1 change: 0 additions & 1 deletion app-android/pubspec.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion app-android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
def root = rootProject.projectDir.toPath()

def plugins = new Properties()
def file = new File(root.toFile(), '.flutter-plugins')
def file = new File(root.toFile(), orcInterface + "/.flutter-plugins")
if (file.exists()) {
file.withReader('UTF-8') { reader -> plugins.load(reader) }
}
Expand Down
1 change: 0 additions & 1 deletion app-android/src/main/java/io/flutter

This file was deleted.

30 changes: 23 additions & 7 deletions app-flutter.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,36 @@
# }}}


.PHONY: all
all:

include ../env/common.mk
pwd/gui := ./gui
$(call include,shared/target-all.mk)

.PHONY: all
all: ios
$(foreach fork,$(forks),$(shell ln -sf $(patsubst %/pubspec.yaml,%,$(fork)) >/dev/null))

.PHONY: create
create: $(pwd/flutter)/packages/flutter/pubspec.lock
$(flutter) create -i objc -a java --no-pub --project-name orchid .

builds :=
builds += apk
builds += macos
builds += ios

include shared/target-all.mk
define all
.PHONY: $(1)
$(1): $$(forks) $$(dart)
$$(flutter) build $(1) $(if $(filter $(1),ios),|| true)
all: $(1)
endef

.PHONY: ios
ios: $(forks)
flutter/bin/flutter build ios
$(foreach build,$(builds),$(eval $(call all,$(build))))

.PHONY: test
test: $(forks)
flutter/bin/flutter run
$(flutter) run

.PHONY: run
run:
Expand Down
19 changes: 5 additions & 14 deletions app-flutter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,11 @@ mkdir app-flutter
cd app-flutter

ln -s ../app-shared shared
ln -s shared/flutter
ln -s shared/gui/in_app_purchase

ln -s shared/gui/pubspec.yaml
ln -s shared/gui/lib
ln -s shared/gui/assets

ln -s ../app-flutter.mk makefile
ln -s ../gui-"$1" gui

flutter=flutter/bin/flutter

"${flutter}" create -i objc -a java --no-pub --project-name orchid .
rm -f README.md
ln -s gui/pubspec.yaml
ln -s gui/lib
ln -s gui/assets

"${flutter}" build apk
"${flutter}" build macos
"${flutter}" build ios
make create
1 change: 0 additions & 1 deletion app-ios/.dart_tool

This file was deleted.

1 change: 0 additions & 1 deletion app-ios/.packages

This file was deleted.

1 change: 0 additions & 1 deletion app-ios/assets

This file was deleted.

1 change: 0 additions & 1 deletion app-ios/flutter

This file was deleted.

1 change: 0 additions & 1 deletion app-ios/in_app_purchase

This file was deleted.

1 change: 0 additions & 1 deletion app-ios/ios

This file was deleted.

1 change: 0 additions & 1 deletion app-ios/lib

This file was deleted.

6 changes: 0 additions & 6 deletions app-ios/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ local :=
local += app.mm.o

local += $(subst %,.,$(generated)).o
$(call depend,ios/Runner/GeneratedPluginRegistrant.m.o,ios/Pods/Manifest.lock)

include env/output.mk

Expand All @@ -77,11 +76,6 @@ endef
$(each)


cflags += -Fflutter/bin/cache/artifacts/engine/ios
lflags += -Fflutter/bin/cache/artifacts/engine/ios



ifneq ($(target),sim)
$(bundle)/PlugIns/$(name).VPN.appex/$(name).VPN: $(patsubst %,$(output)/$(default)/%,$(object) $(linked))
@mkdir -p $(dir $@)
Expand Down
1 change: 0 additions & 1 deletion app-ios/pubspec.yaml

This file was deleted.

1 change: 0 additions & 1 deletion app-linux/.dart_tool

This file was deleted.

1 change: 0 additions & 1 deletion app-linux/.packages

This file was deleted.

1 change: 0 additions & 1 deletion app-linux/assets

This file was deleted.

1 change: 0 additions & 1 deletion app-linux/flutter

This file was deleted.

1 change: 0 additions & 1 deletion app-linux/in_app_purchase

This file was deleted.

1 change: 0 additions & 1 deletion app-linux/lib

This file was deleted.

1 change: 0 additions & 1 deletion app-linux/linux

This file was deleted.

1 change: 0 additions & 1 deletion app-linux/pubspec.yaml

This file was deleted.

1 change: 0 additions & 1 deletion app-macos/.dart_tool

This file was deleted.

1 change: 0 additions & 1 deletion app-macos/.packages

This file was deleted.

1 change: 0 additions & 1 deletion app-macos/assets

This file was deleted.

1 change: 0 additions & 1 deletion app-macos/flutter

This file was deleted.

1 change: 0 additions & 1 deletion app-macos/in_app_purchase

This file was deleted.

1 change: 0 additions & 1 deletion app-macos/lib

This file was deleted.

1 change: 0 additions & 1 deletion app-macos/macos

This file was deleted.

2 changes: 1 addition & 1 deletion app-macos/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ $(output)/%.swift.o: $$(specific) $$(folder).swift $$(code) $(swifts)
$(specific)
@mkdir -p $(dir $@)
@echo [CC] $(target)/$(arch) $<
swift -frontend -sdk $(isysroot) -c -o $@ -primary-file $< $(filter-out ./$<,$(swifts)) -module-name $(name) -Fmacos/Flutter/ephemeral/.symlinks/flutter/darwin-x64 $(foreach pod,$(wildcard $(output)/Release/*/*.framework),-F$(dir $(pod)))
swift -frontend -sdk $(isysroot) -c -o $@ -primary-file $< $(filter-out ./$<,$(swifts)) -module-name $(name) -F$(pwd/gui)/macos/Flutter/ephemeral/.symlinks/flutter/darwin-x64 $(foreach pod,$(wildcard $(output)/Release/*/*.framework),-F$(dir $(pod)))
@touch $@

define _
Expand Down
1 change: 0 additions & 1 deletion app-macos/pubspec.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion app-shared/engine
Submodule engine updated 997 files
2 changes: 1 addition & 1 deletion app-shared/flutter
Submodule flutter updated 2075 files
1 change: 0 additions & 1 deletion app-shared/gui

This file was deleted.

Loading

0 comments on commit 76891ba

Please sign in to comment.