Skip to content

Commit e5fc462

Browse files
authored
Merge pull request #20 from lakasir/fix/build
fix(build):
2 parents 65c0a99 + aa12805 commit e5fc462

12 files changed

Lines changed: 323 additions & 334 deletions

File tree

android/app/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,17 @@ if (keystorePropertiesFile.exists()) {
3333

3434

3535
android {
36-
namespace "com.example.lakasir"
37-
compileSdkVersion flutter.compileSdkVersion
36+
namespace "com.lakasir.lakasir"
37+
compileSdk 35
3838
ndkVersion flutter.ndkVersion
3939

4040
compileOptions {
41-
sourceCompatibility JavaVersion.VERSION_1_8
42-
targetCompatibility JavaVersion.VERSION_1_8
41+
sourceCompatibility JavaVersion.VERSION_17
42+
targetCompatibility JavaVersion.VERSION_17
4343
}
4444

4545
kotlinOptions {
46-
jvmTarget = '1.8'
46+
jvmTarget = '17'
4747
}
4848

4949
sourceSets {

android/app/src/main/kotlin/com/example/lakasir/MainActivity.kt

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package com.lakasir.lakasir
2+
3+
import io.flutter.embedding.android.FlutterActivity
4+
5+
class MainActivity: FlutterActivity() {}

android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
buildscript {
2-
ext.kotlin_version = '1.7.10'
2+
ext.kotlin_version = '1.8.10'
33
repositories {
44
google()
55
mavenCentral()
@@ -9,7 +9,7 @@ buildscript {
99
// START: FlutterFire Configuration
1010
classpath 'com.google.gms:google-services:4.3.15'
1111
// END: FlutterFire Configuration
12-
classpath 'com.android.tools.build:gradle:7.3.0'
12+
classpath 'com.android.tools.build:gradle:8.3.0'
1313
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1414
}
1515
}

android/gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
org.gradle.jvmargs=-Xmx1536M
22
android.useAndroidX=true
33
android.enableJetifier=true
4+
android.defaults.buildfeatures.buildconfig=true
5+
android.nonTransitiveRClass=false
6+
android.nonFinalResIds=false

android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip

android/settings.gradle

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,27 @@ pluginManagement {
1010

1111
includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
1212

13-
plugins {
14-
id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false
13+
repositories {
14+
google()
15+
mavenCentral()
16+
gradlePluginPortal()
1517
}
1618
}
1719

20+
plugins {
21+
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
22+
id "com.android.application" version "8.3.0" apply false
23+
id "org.jetbrains.kotlin.android" version "1.8.10" apply false
24+
}
25+
1826
include ":app"
1927

20-
apply from: "${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle/app_plugin_loader.gradle"
28+
gradle.beforeProject { project ->
29+
project.afterEvaluate {
30+
if (project.hasProperty('android') && project.android.hasProperty('namespace')) {
31+
if (project.android.namespace == null || project.android.namespace.isEmpty()) {
32+
project.android.namespace = project.group.toString()
33+
}
34+
}
35+
}
36+
}

lib/screens/domain/register_domain_screen.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,6 @@ class _RegisterDomainScreenState extends State<RegisterDomainScreen> {
204204
child: MyTextField(
205205
controller: domainNameController,
206206
errorText: registerErrorResponse.domainName,
207-
prefixText:
208-
environment == "local" ? "http://" : "https://",
209207
info: "info_domain".tr,
210208
label: "field_domain_name".tr,
211209
suffixText: ".lakasir.com",

lib/screens/domain/setup_screen.dart

Lines changed: 21 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ class _SetupScreenState extends State<SetupScreen> {
2222
int touchedTimes = 0;
2323
bool isLoading = false;
2424
String domainError = "";
25-
String baseDomain = ".lakasir.com";
2625

2726
@override
2827
void dispose() {
@@ -42,14 +41,10 @@ class _SetupScreenState extends State<SetupScreen> {
4241
}
4342

4443
try {
45-
String domain = "https://${registerDomainController.text}";
46-
if (environment == "local") {
47-
domain = "http://${registerDomainController.text}";
48-
}
49-
domain = domain + baseDomain;
44+
String domain = registerDomainController.text;
5045

5146
await ApiService(domain).fetchData('api');
52-
await storeSetup(registerDomainController.text + baseDomain);
47+
await storeSetup(registerDomainController.text);
5348
return true;
5449
} catch (e) {
5550
setState(() {
@@ -71,60 +66,26 @@ class _SetupScreenState extends State<SetupScreen> {
7166
Container(
7267
margin: const EdgeInsets.only(top: 116, bottom: 58),
7368
child: Center(
74-
child: GestureDetector(
75-
onTap: () {
76-
setState(() {
77-
touchedTimes++;
78-
});
79-
80-
if (touchedTimes == 5) {
81-
var snackBar = SnackBar(
82-
backgroundColor: Colors.transparent,
83-
elevation: 0,
84-
dismissDirection: DismissDirection.none,
85-
padding: EdgeInsets.zero,
86-
margin: const EdgeInsets.only(bottom: 15),
87-
behavior: SnackBarBehavior.floating,
88-
duration: const Duration(seconds: 2),
89-
content: Center(
90-
child: Container(
91-
padding: const EdgeInsets.symmetric(
92-
vertical: 10, horizontal: 14),
93-
decoration: BoxDecoration(
94-
borderRadius: BorderRadius.circular(50),
95-
color: const Color(0xff656565),
96-
),
97-
child: const Text('Using your own domain'),
98-
),
99-
),
100-
);
101-
ScaffoldMessenger.of(context).showSnackBar(snackBar);
102-
setState(() {
103-
baseDomain = "";
104-
});
105-
}
106-
},
107-
child: RichText(
108-
text: TextSpan(
109-
style: const TextStyle(
110-
fontSize: 32,
111-
fontWeight: FontWeight.w600,
112-
),
113-
children: [
114-
TextSpan(
115-
text: 'setup_title'.tr,
116-
style: const TextStyle(color: Colors.black),
117-
),
118-
const WidgetSpan(
119-
child:
120-
SizedBox(width: 8.0), // Add space between spans
121-
),
122-
const TextSpan(
123-
text: "LAKASIR",
124-
style: TextStyle(color: primary),
125-
),
126-
],
69+
child: RichText(
70+
text: TextSpan(
71+
style: const TextStyle(
72+
fontSize: 32,
73+
fontWeight: FontWeight.w600,
12774
),
75+
children: [
76+
TextSpan(
77+
text: 'setup_title'.tr,
78+
style: const TextStyle(color: Colors.black),
79+
),
80+
const WidgetSpan(
81+
child:
82+
SizedBox(width: 8.0), // Add space between spans
83+
),
84+
const TextSpan(
85+
text: "LAKASIR",
86+
style: TextStyle(color: primary),
87+
),
88+
],
12889
),
12990
),
13091
),
@@ -137,9 +98,6 @@ class _SetupScreenState extends State<SetupScreen> {
13798
Container(
13899
margin: const EdgeInsets.only(bottom: 21.0),
139100
child: MyTextField(
140-
prefixText:
141-
environment == "local" ? "http://" : "https://",
142-
suffixText: baseDomain,
143101
controller: registerDomainController,
144102
label: "setup_your_registered_domain".tr,
145103
errorText: domainError,

lib/widgets/image_picker.dart

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,16 +89,23 @@ class _MyImagePickerState extends State<MyImagePicker> {
8989
sourcePath: selected.path,
9090
maxWidth: widget.maxWidth,
9191
maxHeight: widget.maxHeight,
92-
aspectRatioPresets: [
93-
CropAspectRatioPreset.square,
94-
],
9592
uiSettings: [
9693
AndroidUiSettings(
9794
toolbarTitle: 'Cropper',
9895
toolbarColor: primary,
9996
toolbarWidgetColor: Colors.white,
10097
initAspectRatio: CropAspectRatioPreset.square,
10198
lockAspectRatio: true,
99+
aspectRatioPresets: [
100+
CropAspectRatioPreset.square,
101+
],
102+
),
103+
IOSUiSettings(
104+
title: 'Cropper',
105+
aspectRatioPresets: [
106+
CropAspectRatioPreset.square,
107+
],
108+
aspectRatioLockEnabled: true,
102109
),
103110
],
104111
);

0 commit comments

Comments
 (0)