ctripcorp / mmkv-kotlin

A Kotlin Multiplatform porting for MMKV.
Apache License 2.0
131 stars 11 forks source link

Building in Android Studio fails on Ubuntu #27

Closed SamuelMarks closed 7 months ago

SamuelMarks commented 7 months ago

Configuration on demand is an incubating feature.

Configure project :mmkv-kotlin w: Kotlin CocoaPods Plugin is fully supported on MacOS machines only. Gradle tasks that can not run on non-mac hosts will be skipped.

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

2: Task failed with an exception.

BUILD FAILED in 1s


Running Android Studio (Iguana - 2023.2.1) on Ubuntu 23.10

qiaoyuang commented 7 months ago

You need to build it on macOS, because it needs Xcode command tool.

SamuelMarks commented 7 months ago

@qiaoyuang Sure but is there a flag or something so I can build it here and disable the iOS & macOS builds?

qiaoyuang commented 7 months ago

According to your information: Try to add the 2 properties NEXUS_USERNAME and NEXUS_PASSWORD into your global gradle.properties file, the values are not important, if these 2 properties exist, you can pass the building.

qiaoyuang commented 7 months ago

@SamuelMarks Hi, did it work?

SamuelMarks commented 7 months ago

Ok cool I got it to build [only the Apple platforms failed] once I set these variables in the gradle.properties:

# MMKV
NEXUS_USERNAME=mynexususername
NEXUS_PASSWORD=mynexuspassword
SIGNING_KEY_ID=mysigningkeyid
SIGNING_KEY=mysigningkey
SIGNING_PASSWORD=mysigningpassword

(you might want to add this instruction to your README)

qiaoyuang commented 7 months ago

Okay, I will add it. Thx