-
Notifications
You must be signed in to change notification settings - Fork 48
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
base: main
Are you sure you want to change the base?
Conversation
examples/android/gradlew
Outdated
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
f35b6ab
to
4c4dc52
Compare
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]>
Signed-off-by: Mikołaj Florkiewicz <[email protected]>
d4c2186
to
c29921f
Compare
There was a problem hiding this 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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is wasm needed?
- add imports to `build.gradle.kt` | ||
``` | ||
implementation("net.java.dev.jna:jna:5.7.0@aar") | ||
``` |
There was a problem hiding this comment.
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?
proguardFiles( | ||
getDefaultProguardFile("proguard-android-optimize.txt"), | ||
"proguard-rules.pro" | ||
) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
- Create a new kotlin project in xcode | ||
- make sure you have aarch64-apple-ios target installed + simulator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why xcode?
@Composable | ||
fun Greeting(name: String, modifier: Modifier = Modifier) { | ||
Text( | ||
text = "Hello $name!", | ||
modifier = modifier | ||
) | ||
} | ||
|
||
@Preview(showBackground = true) | ||
@Composable | ||
fun GreetingPreview() { | ||
LuminaDemoTheme { | ||
Greeting("Android") | ||
} | ||
} |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this
No description provided.