-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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: display project name in Android Studio #1214
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1214 +/- ##
==========================================
- Coverage 73.25% 73.15% -0.10%
==========================================
Files 21 21
Lines 1645 1643 -2
==========================================
- Hits 1205 1202 -3
- Misses 440 441 +1 ☔ View full report in Codecov by Sentry. |
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.
(would be nice to backport this into a 9.x fix release)
Unlikely this will happen unfortunately.
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.
- PR needs to be rebased with master.
rootProject.name
becomesundefined
when you runcordova build android
.- If I change the project name in
config.xml
the project name is not updated.
09cef1d
to
755a273
Compare
|
Not sure what you mean by this because the issue existed in the PR, not from master or the rebase. All you need to do is create a project with your PR and then run |
You are right, it seems I missed ProjectBuilder constructor is more central than I thought and should not be modified. |
755a273
to
ded6419
Compare
I push a new It deals with forbidden characters in gradle project name to prevent error. |
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.
LGTM
I tested the following steps:
cordova create
cordova platform add
- confirmed
cdv-gradle-name.gradle
was created with project name added. - confirmed
settings.gradle
contained the apply tocdv-gradle-name.gradle
file. cordova build
successfully- confirmed
cdv-gradle-name.gradle
continued to show correct project name. - confirmed
settings.gradle
continued to apply tocdv-gradle-name.gradle
file. - confirmed that Android Studio displayed project name in project list & project view.
- updated project name in
config.xml
cordova prepare
(part of build command but ran as a separate test)- confirmed
cdv-gradle-name.gradle
updated with the new project name. - confirmed
settings.gradle
continued to apply tocdv-gradle-name.gradle
file. cordova build
successfully- confirmed that Android Studio displayed updated project name in project list & project view after performing the
Gradle Sync
process.
Platforms affected
Android
Motivation and Context
fixes #1209
(Android Studio resets project name on Gradle reload)
Description
Add
rootProject.name = "Hello World"
inside settings.gradle at root.Remove .idea/.name file previously added with #1173 and v9.1.0
Testing
npm test
success + project creation, open and run from IDE into emulatorFine on 10.0.0-dev and same for 9.2.0-dev 👍 (would be nice to backport this into a 9.x fix release)
Checklist
(platform)
if this change only applies to one platform (e.g.(android)
)