Skip to content

Commit 42ae1c1

Browse files
authored
1.2.1
* update build.gradle structure * update dependencies * update CHANGELOG * bump version to 1.2.1
1 parent 1c9a92d commit 42ae1c1

File tree

35 files changed

+570
-499
lines changed

35 files changed

+570
-499
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## 1.2.1
2+
3+
- Fix bug on android:
4+
> A problem occurred configuring project ':system_date_time_format'.
5+
> Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl.
6+
> Namespace not specified. Specify a namespace in the module's build file. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace.
7+
- Update dependencies
8+
19
## 1.2.0
210

311
Added `full date pattern` for android

android/build.gradle

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ apply plugin: 'com.android.library'
2525
apply plugin: 'kotlin-android'
2626

2727
android {
28-
compileSdkVersion 33
28+
if (project.android.hasProperty('namespace')) {
29+
namespace 'com.dominikkrajcer.system_date_time_format'
30+
}
31+
32+
compileSdk 34
2933

3034
compileOptions {
3135
sourceCompatibility JavaVersion.VERSION_1_8
@@ -42,8 +46,5 @@ android {
4246

4347
defaultConfig {
4448
minSdkVersion 16
45-
if (project.android.hasProperty('namespace')) {
46-
namespace 'com.dominikkrajcer.system_date_time_format'
47-
}
4849
}
4950
}

example/android/.gitignore

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
gradle-wrapper.jar
2-
/.gradle
3-
/captures/
4-
/gradlew
5-
/gradlew.bat
6-
/local.properties
7-
GeneratedPluginRegistrant.java
8-
9-
# Remember to never publicly share your keystore.
10-
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11-
key.properties
12-
**/*.keystore
13-
**/*.jks
1+
gradle-wrapper.jar
2+
/.gradle
3+
/captures/
4+
/gradlew
5+
/gradlew.bat
6+
/local.properties
7+
GeneratedPluginRegistrant.java
8+
9+
# Remember to never publicly share your keystore.
10+
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11+
key.properties
12+
**/*.keystore
13+
**/*.jks

example/android/app/build.gradle

Lines changed: 67 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,67 @@
1-
def localProperties = new Properties()
2-
def localPropertiesFile = rootProject.file('local.properties')
3-
if (localPropertiesFile.exists()) {
4-
localPropertiesFile.withReader('UTF-8') { reader ->
5-
localProperties.load(reader)
6-
}
7-
}
8-
9-
def flutterRoot = localProperties.getProperty('flutter.sdk')
10-
if (flutterRoot == null) {
11-
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12-
}
13-
14-
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15-
if (flutterVersionCode == null) {
16-
flutterVersionCode = '1'
17-
}
18-
19-
def flutterVersionName = localProperties.getProperty('flutter.versionName')
20-
if (flutterVersionName == null) {
21-
flutterVersionName = '1.0'
22-
}
23-
24-
apply plugin: 'com.android.application'
25-
apply plugin: 'kotlin-android'
26-
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27-
28-
android {
29-
compileSdkVersion 33
30-
31-
compileOptions {
32-
sourceCompatibility JavaVersion.VERSION_1_8
33-
targetCompatibility JavaVersion.VERSION_1_8
34-
}
35-
36-
kotlinOptions {
37-
jvmTarget = '1.8'
38-
}
39-
40-
sourceSets {
41-
main.java.srcDirs += 'src/main/kotlin'
42-
}
43-
44-
defaultConfig {
45-
applicationId "com.dominikkrajcer.system_date_time_format_example"
46-
// You can update the following values to match your application needs.
47-
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
48-
minSdkVersion flutter.minSdkVersion
49-
targetSdkVersion flutter.targetSdkVersion
50-
versionCode flutterVersionCode.toInteger()
51-
versionName flutterVersionName
52-
}
53-
54-
buildTypes {
55-
release {
56-
// TODO: Add your own signing config for the release build.
57-
// Signing with the debug keys for now, so `flutter run --release` works.
58-
signingConfig signingConfigs.debug
59-
}
60-
}
61-
}
62-
63-
flutter {
64-
source '../..'
65-
}
66-
67-
dependencies {
68-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
69-
}
1+
plugins {
2+
id "com.android.application"
3+
id "kotlin-android"
4+
id "dev.flutter.flutter-gradle-plugin"
5+
}
6+
7+
def localProperties = new Properties()
8+
def localPropertiesFile = rootProject.file('local.properties')
9+
if (localPropertiesFile.exists()) {
10+
localPropertiesFile.withReader('UTF-8') { reader ->
11+
localProperties.load(reader)
12+
}
13+
}
14+
15+
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
16+
if (flutterVersionCode == null) {
17+
flutterVersionCode = '1'
18+
}
19+
20+
def flutterVersionName = localProperties.getProperty('flutter.versionName')
21+
if (flutterVersionName == null) {
22+
flutterVersionName = '1.0'
23+
}
24+
25+
android {
26+
namespace "com.example.sytem_date_time_format_example"
27+
compileSdk flutter.compileSdkVersion
28+
ndkVersion flutter.ndkVersion
29+
30+
compileOptions {
31+
sourceCompatibility JavaVersion.VERSION_1_8
32+
targetCompatibility JavaVersion.VERSION_1_8
33+
}
34+
35+
kotlinOptions {
36+
jvmTarget = '1.8'
37+
}
38+
39+
sourceSets {
40+
main.java.srcDirs += 'src/main/kotlin'
41+
}
42+
43+
defaultConfig {
44+
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
45+
applicationId "com.example.sytem_date_time_format_example"
46+
// You can update the following values to match your application needs.
47+
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
48+
minSdkVersion flutter.minSdkVersion
49+
targetSdkVersion flutter.targetSdkVersion
50+
versionCode flutterVersionCode.toInteger()
51+
versionName flutterVersionName
52+
}
53+
54+
buildTypes {
55+
release {
56+
// TODO: Add your own signing config for the release build.
57+
// Signing with the debug keys for now, so `flutter run --release` works.
58+
signingConfig signingConfigs.debug
59+
}
60+
}
61+
}
62+
63+
flutter {
64+
source '../..'
65+
}
66+
67+
dependencies {}
Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.dominikkrajcer.system_date_time_format_example">
3-
<!-- The INTERNET permission is required for development. Specifically,
4-
the Flutter tool needs it to communicate with the running application
5-
to allow setting breakpoints, to provide hot reload, etc.
6-
-->
7-
<uses-permission android:name="android.permission.INTERNET"/>
8-
</manifest>
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
<!-- The INTERNET permission is required for development. Specifically,
3+
the Flutter tool needs it to communicate with the running application
4+
to allow setting breakpoints, to provide hot reload, etc.
5+
-->
6+
<uses-permission android:name="android.permission.INTERNET"/>
7+
</manifest>
Lines changed: 44 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,44 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.dominikkrajcer.system_date_time_format_example">
3-
<application
4-
android:label="system_date_time_format_example"
5-
android:name="${applicationName}"
6-
android:icon="@mipmap/ic_launcher">
7-
<activity
8-
android:name=".MainActivity"
9-
android:exported="true"
10-
android:launchMode="singleTop"
11-
android:theme="@style/LaunchTheme"
12-
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
13-
android:hardwareAccelerated="true"
14-
android:windowSoftInputMode="adjustResize">
15-
<!-- Specifies an Android theme to apply to this Activity as soon as
16-
the Android process has started. This theme is visible to the user
17-
while the Flutter UI initializes. After that, this theme continues
18-
to determine the Window background behind the Flutter UI. -->
19-
<meta-data
20-
android:name="io.flutter.embedding.android.NormalTheme"
21-
android:resource="@style/NormalTheme"
22-
/>
23-
<intent-filter>
24-
<action android:name="android.intent.action.MAIN"/>
25-
<category android:name="android.intent.category.LAUNCHER"/>
26-
</intent-filter>
27-
</activity>
28-
<!-- Don't delete the meta-data below.
29-
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
30-
<meta-data
31-
android:name="flutterEmbedding"
32-
android:value="2" />
33-
</application>
34-
</manifest>
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
<application
3+
android:label="sytem_date_time_format_example"
4+
android:name="${applicationName}"
5+
android:icon="@mipmap/ic_launcher">
6+
<activity
7+
android:name=".MainActivity"
8+
android:exported="true"
9+
android:launchMode="singleTop"
10+
android:theme="@style/LaunchTheme"
11+
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
12+
android:hardwareAccelerated="true"
13+
android:windowSoftInputMode="adjustResize">
14+
<!-- Specifies an Android theme to apply to this Activity as soon as
15+
the Android process has started. This theme is visible to the user
16+
while the Flutter UI initializes. After that, this theme continues
17+
to determine the Window background behind the Flutter UI. -->
18+
<meta-data
19+
android:name="io.flutter.embedding.android.NormalTheme"
20+
android:resource="@style/NormalTheme"
21+
/>
22+
<intent-filter>
23+
<action android:name="android.intent.action.MAIN"/>
24+
<category android:name="android.intent.category.LAUNCHER"/>
25+
</intent-filter>
26+
</activity>
27+
<!-- Don't delete the meta-data below.
28+
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
29+
<meta-data
30+
android:name="flutterEmbedding"
31+
android:value="2" />
32+
</application>
33+
<!-- Required to query activities that can process text, see:
34+
https://developer.android.com/training/package-visibility?hl=en and
35+
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
36+
37+
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
38+
<queries>
39+
<intent>
40+
<action android:name="android.intent.action.PROCESS_TEXT"/>
41+
<data android:mimeType="text/plain"/>
42+
</intent>
43+
</queries>
44+
</manifest>

example/android/app/src/main/kotlin/com/dominikkrajcer/system_date_time_format_example/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.example.sytem_date_time_format_example
2+
3+
import io.flutter.embedding.android.FlutterActivity
4+
5+
class MainActivity: FlutterActivity()
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<!-- Modify this file to customize your launch splash screen -->
3-
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
4-
<item android:drawable="?android:colorBackground" />
5-
6-
<!-- You can insert your own image assets here -->
7-
<!-- <item>
8-
<bitmap
9-
android:gravity="center"
10-
android:src="@mipmap/launch_image" />
11-
</item> -->
12-
</layer-list>
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Modify this file to customize your launch splash screen -->
3+
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
4+
<item android:drawable="?android:colorBackground" />
5+
6+
<!-- You can insert your own image assets here -->
7+
<!-- <item>
8+
<bitmap
9+
android:gravity="center"
10+
android:src="@mipmap/launch_image" />
11+
</item> -->
12+
</layer-list>
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<!-- Modify this file to customize your launch splash screen -->
3-
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
4-
<item android:drawable="@android:color/white" />
5-
6-
<!-- You can insert your own image assets here -->
7-
<!-- <item>
8-
<bitmap
9-
android:gravity="center"
10-
android:src="@mipmap/launch_image" />
11-
</item> -->
12-
</layer-list>
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Modify this file to customize your launch splash screen -->
3+
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
4+
<item android:drawable="@android:color/white" />
5+
6+
<!-- You can insert your own image assets here -->
7+
<!-- <item>
8+
<bitmap
9+
android:gravity="center"
10+
android:src="@mipmap/launch_image" />
11+
</item> -->
12+
</layer-list>

0 commit comments

Comments
 (0)