-
Notifications
You must be signed in to change notification settings - Fork 4
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 android build #106
Fix android build #106
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,6 @@ name: Android Build | |
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,43 +2,21 @@ plugins { | |
id "com.android.application" | ||
id "kotlin-android" | ||
id "dev.flutter.flutter-gradle-plugin" | ||
id "com.google.gms.google-services" | ||
id "com.google.firebase.crashlytics" | ||
} | ||
|
||
|
||
def localProperties = new Properties() | ||
def localPropertiesFile = rootProject.file('local.properties') | ||
if (localPropertiesFile.exists()) { | ||
localPropertiesFile.withReader('UTF-8') { reader -> | ||
localProperties.load(reader) | ||
} | ||
} | ||
|
||
|
||
def flutterVersionCode = localProperties.getProperty('flutter.versionCode') | ||
if (flutterVersionCode == null) { | ||
flutterVersionCode = '1' | ||
} | ||
|
||
def flutterVersionName = localProperties.getProperty('flutter.versionName') | ||
if (flutterVersionName == null) { | ||
flutterVersionName = '1.0' | ||
} | ||
|
||
|
||
|
||
|
||
android { | ||
compileSdkVersion 34//flutter.compileSdkVersion | ||
namespace = "com.example.canopas_unity" | ||
compileSdk = flutter.compileSdkVersion | ||
ndkVersion = flutter.ndkVersion | ||
Comment on lines
8
to
+11
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix inconsistent SDK version configuration The compileSdkVersion is both hardcoded and referenced from flutter: -compileSdkVersion 34//flutter.compileSdkVersion
-compileSdk = flutter.compileSdkVersion
+compileSdkVersion flutter.compileSdkVersion
|
||
|
||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
|
||
kotlinOptions { | ||
jvmTarget = '1.8' | ||
jvmTarget = JavaVersion.VERSION_1_8 | ||
} | ||
|
||
sourceSets { | ||
|
@@ -48,10 +26,10 @@ android { | |
defaultConfig { | ||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). | ||
applicationId "com.canopas.projectunity" | ||
minSdkVersion 21 | ||
targetSdkVersion flutter.targetSdkVersion | ||
versionCode flutterVersionCode.toInteger() | ||
versionName flutterVersionName | ||
minSdkVersion 34 | ||
targetSdk = flutter.targetSdkVersion | ||
cp-sneha-s marked this conversation as resolved.
Show resolved
Hide resolved
|
||
versionCode = flutter.versionCode | ||
versionName = flutter.versionName | ||
android.applicationVariants.all { variant -> | ||
variant.outputs.all { | ||
outputFileName = "ProjectUnity-${variant.name}-${versionName}-${versionCode}.apk" | ||
|
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Wed Apr 26 12:42:38 IST 2023 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
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.
Update namespace to use production domain
The namespace is using an example domain which should not be used in production:
📝 Committable suggestion