google / google/j2objc

Feature request: auto-generated module.modulemap for working with swift (--swift-friendly)

Open
#752 2 comments 0 reactions 1 assignee Claimed by @tomball View on GitHub
Dominant language
Java
Stars
6k
Forks
999
Avg merge
19h 20m
Merged PRs (30d)
14

Description

Hi,

Nowadays (Version 7.3.1 (7D1014)) Xcode forces you to modularly (i.e. `module.modulemap`) import the objc header files.

It would be nice if the buildscript would auto-generate the proper modulemap, inside `dist/include` and the separate frameworks.

So for instance:

```
module j2objc {
// import IOSArray IOSClass IOSObjectArray IOSPrimitiveArray IOSReflection J2ObjC_common J2ObjC_header J2ObjC_source J2ObjC_types JavaObject JreEmulation JreRetainedWith NSCopying+JavaCloneable NSDataInputStream NSDataOutputStream NSDictionaryMap NSException+JavaThrowable NSNumber+JavaNumber NSObject+JavaObject NSString+JavaString jni etc.
umbrella "."
explicit module * { export * }
//or: header "JavaObject.h", header "IOSClass.h", header "IOSArray.h" etc.

framework module google {
umbrella header "google-umbrella.h"
export *
module * { export * }
}

explicit module android {
explicit module os {
umbrella "android/os"
explicit module * { export * }
}
}

// etc.
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.