Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions cli/src/tasks/migrate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,23 @@ async function updateAppBuildGradle(filename: string) {
`,
'',
);

if (!replaced.includes('def androidxAppCompatVersion = rootProject.ext.androidxAppCompatVersion')) {
replaced = replaced.replace(
`apply plugin: 'com.android.application'\n\n`,
`apply plugin: 'com.android.application'

def androidxAppCompatVersion = rootProject.ext.androidxAppCompatVersion
def androidxCoordinatorLayoutVersion = rootProject.ext.androidxCoordinatorLayoutVersion
def coreSplashScreenVersion = rootProject.ext.coreSplashScreenVersion
def junitVersion = rootProject.ext.junitVersion
def androidxJunitVersion = rootProject.ext.androidxJunitVersion
def androidxEspressoCoreVersion = rootProject.ext.androidxEspressoCoreVersion

`,
);
}

writeFileSync(filename, replaced, 'utf-8');
}

Expand Down
Loading