Skip to content

Commit 5b99075

Browse files
authored
feat(android): use android template from capacitor-4 (#36)
1 parent d618732 commit 5b99075

File tree

12 files changed

+182
-180
lines changed

12 files changed

+182
-180
lines changed

android/app/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ appVersioning {
1212
android {
1313
compileSdkVersion rootProject.ext.compileSdkVersion
1414
defaultConfig {
15-
applicationId "io.ionic.starter"
15+
applicationId "com.getcapacitor.app"
1616
minSdkVersion rootProject.ext.minSdkVersion
1717
targetSdkVersion rootProject.ext.targetSdkVersion
1818
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -38,11 +38,11 @@ repositories {
3838

3939
dependencies {
4040
implementation fileTree(include: ['*.jar'], dir: 'libs')
41-
implementation AndroidX.appCompat
41+
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
4242
implementation project(':capacitor-android')
43-
testImplementation Testing.junit4
44-
androidTestImplementation AndroidX.test.ext.junit
45-
androidTestImplementation AndroidX.test.espresso.core
43+
testImplementation "junit:junit:$junitVersion"
44+
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
45+
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
4646
implementation project(':capacitor-cordova-android-plugins')
4747
}
4848

android/app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="io.ionic.starter">
3+
package="com.getcapacitor.myapp">
44

55
<application
66
android:allowBackup="true"
@@ -12,11 +12,11 @@
1212

1313
<activity
1414
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
15-
android:name="io.ionic.starter.MainActivity"
15+
android:name="com.getcapacitor.myapp.MainActivity"
1616
android:label="@string/title_activity_main"
1717
android:theme="@style/AppTheme.NoActionBarLaunch"
1818
android:launchMode="singleTask"
19-
android:exported="false">
19+
android:exported="true">
2020

2121
<intent-filter>
2222
<action android:name="android.intent.action.MAIN" />

android/app/src/main/java/io/ionic/starter/MainActivity.java renamed to android/app/src/main/java/com/getcapacitor/myapp/MainActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.ionic.starter;
1+
package com.getcapacitor.myapp;
22

33
import com.getcapacitor.BridgeActivity;
44

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version='1.0' encoding='utf-8'?>
22
<resources>
3-
<string name="app_name">example</string>
4-
<string name="title_activity_main">example</string>
5-
<string name="package_name">io.ionic.starter</string>
6-
<string name="custom_url_scheme">io.ionic.starter</string>
3+
<string name="app_name">My App</string>
4+
<string name="title_activity_main">My App</string>
5+
<string name="package_name">com.getcapacitor.myapp</string>
6+
<string name="custom_url_scheme">com.getcapacitor.myapp</string>
77
</resources>

android/build.gradle

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2+
23
buildscript {
34

45
repositories {
56
google()
67
mavenCentral()
7-
gradlePluginPortal()
88
}
99
dependencies {
10-
classpath Android.tools.build.gradlePlugin
11-
classpath Google.playServicesGradlePlugin
10+
classpath 'com.android.tools.build:gradle:7.1.1'
11+
classpath 'com.google.gms:google-services:4.3.5'
1212

1313
// NOTE: Do not place your application dependencies here; they belong
1414
// in the individual module build.gradle files
@@ -21,7 +21,6 @@ allprojects {
2121
repositories {
2222
google()
2323
mavenCentral()
24-
gradlePluginPortal()
2524
}
2625
}
2726

618 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)