Skip to content

Commit 842c73e

Browse files
Merge pull request #100 from rootstrap/improvement/dependencies-update
Fixed error "You are applying Flutter’s app_plugin_loader Gradle plugin imperatively"
2 parents efb13c8 + e2b4023 commit 842c73e

File tree

13 files changed

+102
-80
lines changed

13 files changed

+102
-80
lines changed

app/android/app/build.gradle

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
plugins {
2+
id "com.android.application"
3+
id "kotlin-android"
4+
id "dev.flutter.flutter-gradle-plugin"
5+
}
6+
17
def flutterProperties = new Properties()
28
def localPropertiesFile = rootProject.file('local.properties')
39
if (localPropertiesFile.exists()) {
@@ -14,11 +20,6 @@ if (buildPropertiesFile.exists()) {
1420
}
1521
}
1622

17-
def flutterRoot = flutterProperties.getProperty('flutter.sdk')
18-
if (flutterRoot == null) {
19-
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
20-
}
21-
2223
/**
2324
* Declare the env vars here
2425
* **/
@@ -51,11 +52,8 @@ if (keystorePropertiesFile.exists()) {
5152
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
5253
}
5354

54-
apply plugin: 'com.android.application'
55-
apply plugin: 'kotlin-android'
56-
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
57-
5855
android {
56+
namespace 'com.rootstrap.base.flutter_base_rootstrap'
5957
compileSdkVersion buildProperties.getProperty('flutter.compileSdkVersion').toInteger()
6058
ndkVersion flutter.ndkVersion
6159

@@ -105,6 +103,3 @@ flutter {
105103
source '../..'
106104
}
107105

108-
dependencies {
109-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
110-
}

app/android/build.gradle

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,12 @@
1-
buildscript {
2-
ext.kotlin_version = '1.6.10'
3-
repositories {
4-
google()
5-
mavenCentral()
6-
}
7-
8-
dependencies {
9-
classpath 'com.android.tools.build:gradle:7.1.2'
10-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11-
}
12-
}
13-
141
allprojects {
152
repositories {
163
google()
174
mavenCentral()
185
}
19-
}
20-
21-
rootProject.buildDir = '../build'
22-
subprojects {
23-
project.buildDir = "${rootProject.buildDir}/${project.name}"
24-
}
25-
subprojects {
26-
project.evaluationDependsOn(':app')
27-
}
286

29-
tasks.register("clean", Delete) {
30-
delete rootProject.buildDir
7+
rootProject.buildDir = '../build'
8+
subprojects {
9+
project.buildDir = "${rootProject.buildDir}/${project.name}"
10+
project.evaluationDependsOn(':app')
11+
}
3112
}

app/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip

app/android/settings.gradle

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,26 @@
1-
include ':app'
1+
pluginManagement {
2+
def flutterSdkPath = {
3+
def properties = new Properties()
4+
file("local.properties").withInputStream { properties.load(it) }
5+
def flutterSdkPath = properties.getProperty("flutter.sdk")
6+
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
7+
return flutterSdkPath
8+
}()
29

3-
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4-
def properties = new Properties()
10+
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
511

6-
assert localPropertiesFile.exists()
7-
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
12+
repositories {
13+
google()
14+
mavenCentral()
15+
gradlePluginPortal()
16+
}
817

9-
def flutterSdkPath = properties.getProperty("flutter.sdk")
10-
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11-
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
18+
}
19+
20+
plugins {
21+
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
22+
id "com.android.application" version "8.7.0" apply false
23+
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
24+
}
25+
26+
include ":app"

app/ios/Flutter/AppFrameworkInfo.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
<key>CFBundleVersion</key>
2222
<string>1.0</string>
2323
<key>MinimumOSVersion</key>
24-
<string>11.0</string>
24+
<string>13.0</string>
2525
</dict>
2626
</plist>

app/ios/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Uncomment this line to define a global platform for your project
2-
# platform :ios, '11.0'
2+
platform :ios, '13.0'
33

44
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
55
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

app/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 40 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
7FCD1AAFFC74258114648268 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
5151
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
5252
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
53-
97C146EE1CF9000F007C117D /* Flutter Base.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Flutter Base.app"; sourceTree = BUILT_PRODUCTS_DIR; };
53+
97C146EE1CF9000F007C117D /* RS Base Debug 2.0.0.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "RS Base Debug 2.0.0.app"; sourceTree = BUILT_PRODUCTS_DIR; };
5454
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
5555
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
5656
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
@@ -114,7 +114,7 @@
114114
97C146EF1CF9000F007C117D /* Products */ = {
115115
isa = PBXGroup;
116116
children = (
117-
97C146EE1CF9000F007C117D /* Flutter Base.app */,
117+
97C146EE1CF9000F007C117D /* RS Base Debug 2.0.0.app */,
118118
);
119119
name = Products;
120120
sourceTree = "<group>";
@@ -157,14 +157,15 @@
157157
9705A1C41CF9048500538489 /* Embed Frameworks */,
158158
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
159159
DD7C17448DBE0C72AFB53D97 /* [CP] Embed Pods Frameworks */,
160+
0A3832D21E11A3F695107A97 /* [CP] Copy Pods Resources */,
160161
);
161162
buildRules = (
162163
);
163164
dependencies = (
164165
);
165166
name = Runner;
166167
productName = Runner;
167-
productReference = 97C146EE1CF9000F007C117D /* Flutter Base.app */;
168+
productReference = 97C146EE1CF9000F007C117D /* RS Base Debug 2.0.0.app */;
168169
productType = "com.apple.product-type.application";
169170
};
170171
/* End PBXNativeTarget section */
@@ -173,7 +174,7 @@
173174
97C146E61CF9000F007C117D /* Project object */ = {
174175
isa = PBXProject;
175176
attributes = {
176-
LastUpgradeCheck = 1300;
177+
LastUpgradeCheck = 1510;
177178
ORGANIZATIONNAME = "";
178179
TargetAttributes = {
179180
97C146ED1CF9000F007C117D = {
@@ -217,6 +218,23 @@
217218
/* End PBXResourcesBuildPhase section */
218219

219220
/* Begin PBXShellScriptBuildPhase section */
221+
0A3832D21E11A3F695107A97 /* [CP] Copy Pods Resources */ = {
222+
isa = PBXShellScriptBuildPhase;
223+
buildActionMask = 2147483647;
224+
files = (
225+
);
226+
inputFileListPaths = (
227+
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
228+
);
229+
name = "[CP] Copy Pods Resources";
230+
outputFileListPaths = (
231+
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
232+
);
233+
runOnlyForDeploymentPostprocessing = 0;
234+
shellPath = /bin/sh;
235+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
236+
showEnvVarsInLog = 0;
237+
};
220238
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
221239
isa = PBXShellScriptBuildPhase;
222240
alwaysOutOfDate = 1;
@@ -362,7 +380,7 @@
362380
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
363381
GCC_WARN_UNUSED_FUNCTION = YES;
364382
GCC_WARN_UNUSED_VARIABLE = YES;
365-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
383+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
366384
MTL_ENABLE_DEBUG_INFO = NO;
367385
SDKROOT = iphoneos;
368386
SUPPORTED_PLATFORMS = iphoneos;
@@ -380,6 +398,7 @@
380398
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
381399
ENABLE_BITCODE = NO;
382400
INFOPLIST_FILE = Runner/Info.plist;
401+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
383402
LD_RUNPATH_SEARCH_PATHS = (
384403
"$(inherited)",
385404
"@executable_path/Frameworks",
@@ -440,7 +459,7 @@
440459
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
441460
GCC_WARN_UNUSED_FUNCTION = YES;
442461
GCC_WARN_UNUSED_VARIABLE = YES;
443-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
462+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
444463
MTL_ENABLE_DEBUG_INFO = YES;
445464
ONLY_ACTIVE_ARCH = YES;
446465
SDKROOT = iphoneos;
@@ -457,6 +476,7 @@
457476
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
458477
ENABLE_BITCODE = NO;
459478
INFOPLIST_FILE = Runner/Info.plist;
479+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
460480
LD_RUNPATH_SEARCH_PATHS = (
461481
"$(inherited)",
462482
"@executable_path/Frameworks",
@@ -518,7 +538,7 @@
518538
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
519539
GCC_WARN_UNUSED_FUNCTION = YES;
520540
GCC_WARN_UNUSED_VARIABLE = YES;
521-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
541+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
522542
MTL_ENABLE_DEBUG_INFO = YES;
523543
ONLY_ACTIVE_ARCH = YES;
524544
SDKROOT = iphoneos;
@@ -535,6 +555,7 @@
535555
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
536556
ENABLE_BITCODE = NO;
537557
INFOPLIST_FILE = Runner/Info.plist;
558+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
538559
LD_RUNPATH_SEARCH_PATHS = (
539560
"$(inherited)",
540561
"@executable_path/Frameworks",
@@ -590,7 +611,7 @@
590611
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
591612
GCC_WARN_UNUSED_FUNCTION = YES;
592613
GCC_WARN_UNUSED_VARIABLE = YES;
593-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
614+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
594615
MTL_ENABLE_DEBUG_INFO = NO;
595616
SDKROOT = iphoneos;
596617
SUPPORTED_PLATFORMS = iphoneos;
@@ -610,6 +631,7 @@
610631
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
611632
ENABLE_BITCODE = NO;
612633
INFOPLIST_FILE = Runner/Info.plist;
634+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
613635
LD_RUNPATH_SEARCH_PATHS = (
614636
"$(inherited)",
615637
"@executable_path/Frameworks",
@@ -664,7 +686,7 @@
664686
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
665687
GCC_WARN_UNUSED_FUNCTION = YES;
666688
GCC_WARN_UNUSED_VARIABLE = YES;
667-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
689+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
668690
MTL_ENABLE_DEBUG_INFO = NO;
669691
SDKROOT = iphoneos;
670692
SUPPORTED_PLATFORMS = iphoneos;
@@ -684,6 +706,7 @@
684706
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
685707
ENABLE_BITCODE = NO;
686708
INFOPLIST_FILE = Runner/Info.plist;
709+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
687710
LD_RUNPATH_SEARCH_PATHS = (
688711
"$(inherited)",
689712
"@executable_path/Frameworks",
@@ -738,7 +761,7 @@
738761
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
739762
GCC_WARN_UNUSED_FUNCTION = YES;
740763
GCC_WARN_UNUSED_VARIABLE = YES;
741-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
764+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
742765
MTL_ENABLE_DEBUG_INFO = NO;
743766
SDKROOT = iphoneos;
744767
SUPPORTED_PLATFORMS = iphoneos;
@@ -756,6 +779,7 @@
756779
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
757780
ENABLE_BITCODE = NO;
758781
INFOPLIST_FILE = Runner/Info.plist;
782+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
759783
LD_RUNPATH_SEARCH_PATHS = (
760784
"$(inherited)",
761785
"@executable_path/Frameworks",
@@ -810,7 +834,7 @@
810834
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
811835
GCC_WARN_UNUSED_FUNCTION = YES;
812836
GCC_WARN_UNUSED_VARIABLE = YES;
813-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
837+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
814838
MTL_ENABLE_DEBUG_INFO = NO;
815839
SDKROOT = iphoneos;
816840
SUPPORTED_PLATFORMS = iphoneos;
@@ -828,6 +852,7 @@
828852
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
829853
ENABLE_BITCODE = NO;
830854
INFOPLIST_FILE = Runner/Info.plist;
855+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
831856
LD_RUNPATH_SEARCH_PATHS = (
832857
"$(inherited)",
833858
"@executable_path/Frameworks",
@@ -887,7 +912,7 @@
887912
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
888913
GCC_WARN_UNUSED_FUNCTION = YES;
889914
GCC_WARN_UNUSED_VARIABLE = YES;
890-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
915+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
891916
MTL_ENABLE_DEBUG_INFO = YES;
892917
ONLY_ACTIVE_ARCH = YES;
893918
SDKROOT = iphoneos;
@@ -936,7 +961,7 @@
936961
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
937962
GCC_WARN_UNUSED_FUNCTION = YES;
938963
GCC_WARN_UNUSED_VARIABLE = YES;
939-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
964+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
940965
MTL_ENABLE_DEBUG_INFO = NO;
941966
SDKROOT = iphoneos;
942967
SUPPORTED_PLATFORMS = iphoneos;
@@ -956,6 +981,7 @@
956981
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
957982
ENABLE_BITCODE = NO;
958983
INFOPLIST_FILE = Runner/Info.plist;
984+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
959985
LD_RUNPATH_SEARCH_PATHS = (
960986
"$(inherited)",
961987
"@executable_path/Frameworks",
@@ -978,6 +1004,7 @@
9781004
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
9791005
ENABLE_BITCODE = NO;
9801006
INFOPLIST_FILE = Runner/Info.plist;
1007+
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
9811008
LD_RUNPATH_SEARCH_PATHS = (
9821009
"$(inherited)",
9831010
"@executable_path/Frameworks",

app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Dev.xcscheme

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<BuildableReference
1616
BuildableIdentifier = "primary"
1717
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
18-
BuildableName = "Flutter Base.app"
18+
BuildableName = "RS Base.app"
1919
BlueprintName = "Runner"
2020
ReferencedContainer = "container:Runner.xcodeproj">
2121
</BuildableReference>
@@ -45,7 +45,7 @@
4545
<BuildableReference
4646
BuildableIdentifier = "primary"
4747
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
48-
BuildableName = "Flutter Base.app"
48+
BuildableName = "RS Base.app"
4949
BlueprintName = "Runner"
5050
ReferencedContainer = "container:Runner.xcodeproj">
5151
</BuildableReference>
@@ -62,7 +62,7 @@
6262
<BuildableReference
6363
BuildableIdentifier = "primary"
6464
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
65-
BuildableName = "Flutter Base.app"
65+
BuildableName = "RS Base.app"
6666
BlueprintName = "Runner"
6767
ReferencedContainer = "container:Runner.xcodeproj">
6868
</BuildableReference>

0 commit comments

Comments
 (0)