microsoft / appcenter

Central repository for App Center open source resources and planning.
https://appcenter.ms
Creative Commons Attribution 4.0 International
1.01k stars 223 forks source link

kotlin not workin in appcenter cli #2548

Closed rohitgarg2022 closed 1 year ago

rohitgarg2022 commented 1 year ago

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

rohitgarg2022 commented 1 year ago

Command 'codepush release-react -a rohit.garg.com/housingnative --entry-file index.js --sourcemap-output index.map -d rewrite -b index.android.bundle' failed with exception "Unable to find gradle file "android/app/build.gradle"." The file is basically android/app/build.gradle.kts but it is not picking that file.

MikhailSuendukov commented 1 year ago

Hi @rohitgarg2022 and thanks for reaching us. Did you try --gradle-file option for this command?

rohitgarg2022 commented 1 year ago

Yes i tried that option also 'codepush release-react -a rohit.garg.com/housingnative --entry-file index.js --sourcemap-output index.map -d rewrite -b index.android.bundle' -g android/app/build.gradle.kts.

But then it gives me another error that value for property android.defaultconfig.versionName is not specified , while i have the value of versionName in the build.gradle.kts

MikhailSuendukov commented 1 year ago

Could you please attach the logs of these commands and a simple example of a demo application with such a file that reproduces this error. Also have you tried using the latest version of appcenter-cli?

rohitgarg2022 commented 1 year ago

Command 'codepush release-react -a rohit.garg1-gmail.com/native --entry-file index.js --sourcemap-output index.map -d rewrite -b index.android.bundle -g android/app/build.gradle.kts' failed with exception "The "android/app/build.gradle.kts" file doesn't specify a value for the "android.defaultConfig.versionName" property

build.gradle.kts

android { compileSdk = ProjectConfig.compileSdk defaultConfig { applicationId = ProjectConfig.appId minSdk = ProjectConfig.minSdk targetSdk = ProjectConfig.targetSdk versionCode = ProjectConfig.versionCode signingConfig = signingConfigs.getByName("debug") versionName = ProjectConfig.versionName testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" vectorDrawables { useSupportLibrary = true } }

object ProjectConfig { const val appId = "com.dummy.application" const val compileSdk = 33 const val minSdk = 21 const val targetSdk = 33 const val versionCode = 16 const val versionName = "2.5"

}

"appcenter-cli": "^2.13.7",

MikhailSuendukov commented 1 year ago

Whats about simple example of a demo application with such a file that reproduces this error? And have you tried using the latest version of appcenter-cli?

MikhailSuendukov commented 1 year ago

I am closing this issue due to inactivity. If you have any questions, you can freely reopen it.