Skip to content

feat: Add android example #616

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Conversation

fl0rek
Copy link
Member

@fl0rek fl0rek commented Apr 16, 2025

No description provided.

Copy link
Member Author

@fl0rek fl0rek Apr 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opening up the discussion: should we commit the gradle wrapper?
Gradle itself recommends committing it (reproducibility), but committing random shell scripts + jars ( 😱 ) rubs me the wrong way.
More context: https://stackoverflow.com/questions/20348451/why-should-the-gradle-wrapper-be-committed-to-vcs

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we avoided committing it when writing tests for uniffi package, so maybe we should avoid it now too?

@fl0rek fl0rek force-pushed the feat/android-example branch 2 times, most recently from f35b6ab to 4c4dc52 Compare April 16, 2025 11:24
@fl0rek fl0rek marked this pull request as ready for review April 17, 2025 17:19
fl0rek added 10 commits May 12, 2025 10:05
Signed-off-by: Mikołaj Florkiewicz <[email protected]>
Signed-off-by: Mikołaj Florkiewicz <[email protected]>
Signed-off-by: Mikołaj Florkiewicz <[email protected]>
Signed-off-by: Mikołaj Florkiewicz <[email protected]>
Signed-off-by: Mikołaj Florkiewicz <[email protected]>
Signed-off-by: Mikołaj Florkiewicz <[email protected]>
Signed-off-by: Mikołaj Florkiewicz <[email protected]>
Signed-off-by: Mikołaj Florkiewicz <[email protected]>
Signed-off-by: Mikołaj Florkiewicz <[email protected]>
@fl0rek fl0rek force-pushed the feat/android-example branch from d4c2186 to c29921f Compare May 12, 2025 08:05
@fl0rek fl0rek requested review from oblique and zvolin May 14, 2025 06:17
Copy link
Member

@zvolin zvolin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left some questions

# Instructions to re-create the setup

- Create a new kotlin project in xcode
- make sure you have aarch64-apple-ios target installed + simulator
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need apple-ios and simulator for android?

- Create a new kotlin project in xcode
- make sure you have aarch64-apple-ios target installed + simulator
```
rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android thumbv7em-none-eabihf wasm32-unknown-unknown x86_64-linux-android
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is wasm needed?

Comment on lines +13 to +16
- add imports to `build.gradle.kt`
```
implementation("net.java.dev.jna:jna:5.7.0@aar")
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this code snippet what needs to be added?

Comment on lines +24 to +27
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this needed? I can't see those files around

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the purpose of the files in res directory? are they generated? maybe we don't need to commit those

Comment on lines +3 to +4
- Create a new kotlin project in xcode
- make sure you have aarch64-apple-ios target installed + simulator
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why xcode?

Comment on lines +240 to +254
@Composable
fun Greeting(name: String, modifier: Modifier = Modifier) {
Text(
text = "Hello $name!",
modifier = modifier
)
}

@Preview(showBackground = true)
@Composable
fun GreetingPreview() {
LuminaDemoTheme {
Greeting("Android")
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove "hello world" related stuff

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants