Skip to content
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

fix: fix unity gradle setting and update line-sdk-unity-wrapper-release.aar to 5.8.1 #53

Merged
merged 1 commit into from
Jul 6, 2023

Conversation

tsairene
Copy link
Contributor

@tsairene tsairene commented Jul 5, 2023

Summary

Address issue #51

Due to deprecation of jcenter, update Android library repo from jcenter to mavenCentral.

Since there's no line-sdk-android v5.1.1, it's also updated to use latest one v5.8.1 instead.

Verification

  1. Run ./gradlew assembleRelease in line-sdk-unity/linesdk-android-unity-wrapper folder
  2. Copy line-sdk-unity/linesdk-android-unity-wrapper/build/outputs/aar/line-sdk-unity-wrapper-release.aar to LINE_SDK_Unity/Assets/Plugins/Android/line-sdk-unity-wrapper-release.aar
  3. Menu > File > Build And Run (Export to folder)
Build And Run
  1. Build And Run on Pixel 6 Pro

Reference

@tsairene tsairene requested review from onevcat and plateaukao July 5, 2023 04:36
Copy link
Member

@plateaukao plateaukao left a comment

Choose a reason for hiding this comment

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

LGTM

@onevcat
Copy link
Member

onevcat commented Jul 6, 2023

Nice. Thank you!

@onevcat onevcat merged commit e6002c5 into master Jul 6, 2023
@onevcat
Copy link
Member

onevcat commented Jul 6, 2023

@tsairene

I am now trying to verify the changes. As in the public doc, we need to support from Unity 2020.3, but changes in this PR upgrades the Unity to 2022.3.4.

Since we have to export the package from 2020.3.0, I tried to downgrade to that version and build the sample project. However, it gives me an error below:

1 exception was raised by workers:
java.lang.RuntimeException: java.lang.RuntimeException: Duplicate class kotlinx.coroutines.AbstractCoroutine found in
modules jetified-kotlinx-coroutines-core-1.3.0.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0) and jetified-kotlinx-coroutines-core-jvm-1.5.0.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.0)

Duplicate class kotlinx.coroutines.Active found in modules jetified-kotlinx-coroutines-core-1.3.0.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0) and jetified-kotlinx-coroutines-core-jvm-1.5.0.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.0)

... Much more similar

I am not sure but I guess the reason can be the android.useAndroidX=true line in the wrapper? (or maybe the Kotlin was added by multiple time?)

Can you help and check to see is it possible to build the project on Unity 2020.3.0?

@shunsuke-yabuhana0coly-info
Copy link

shunsuke-yabuhana0coly-info commented Jul 6, 2023

In Unity2020.3, isn't the 'android.enableR8 =MINIFY_WITH_R_EIGHT' statement required in gradleTemplate.properties?

Because in Unity2022.2 or later Gradle has been updated from 6.1.1 to 7.2 and Android Gradle Plugin from 4.0.1 to 7.1.2 and android.enableR8 is now a bool property.

In Unity2022.2 or later, 'android.enableR8 =true' is the default value, so it does not need to be listed.

I think I need to implement a separate for each version somehow within gradleTemplate.properties.

@onevcat
Copy link
Member

onevcat commented Jul 6, 2023

Hi,

Thanks for the feedback.

We noticed this and are still working on another update. The master branch is not a released branch so please avoid use things there yet.

@tsairene tsairene mentioned this pull request Jul 24, 2023
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.

4 participants