andriydruk / swift-weather-app

Cross-platform Swift application for iOS/Mac/Android/Windows
MIT License
48 stars 10 forks source link

The role of sourcery for swift-android-toolchain #28

Open pnewell opened 10 months ago

pnewell commented 10 months ago

It looks like to get swift-android-toolchain working in a project, you also need to use sourcery to build adjacent kotlin classes, is that correct? I see the prebuilt core classes in Kotlin in the project, but I don't see any sourcery definition that builds them. I tried searching for using sourcery with java_swift but couldn't find anything. What role does sourcery play in creating classes that can be referenced from my kotlin code?

andriydruk commented 10 months ago

Currently, there is no sourcery in swift-android-toolchain It was used in this project just to generate the XCTest main.swift, but the current version of Swift supports automatic generation.

All Kotlin "headers" for Swift structures/classes/protocols were written manually. However, we have a plan to automatization of this step in the future.

andriydruk commented 10 months ago

I guess this header in some files was misleading:

// Generated using JavaSwift codegen by Sourcery
// DO NOT EDIT

Unfortunately, it's not true. This file wasn't generated :(