Updated android project, changed activity name

Living dangerous today
This commit is contained in:
JHubi1 2024-08-23 21:54:31 +02:00
parent 20dbce2f34
commit ada795db4c
No known key found for this signature in database
GPG Key ID: 7BF82570CBBBD050
7 changed files with 48 additions and 63 deletions

View File

@ -4,7 +4,7 @@
# This file should be version controlled and should not be manually edited. # This file should be version controlled and should not be manually edited.
version: version:
revision: "b0850beeb25f6d5b10426284f506557f66181b36" revision: "761747bfc538b5af34aa0d3fac380f1bc331ec49"
channel: "stable" channel: "stable"
project_type: app project_type: app
@ -13,17 +13,17 @@ project_type: app
migration: migration:
platforms: platforms:
- platform: root - platform: root
create_revision: b0850beeb25f6d5b10426284f506557f66181b36 create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: b0850beeb25f6d5b10426284f506557f66181b36 base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
- platform: android - platform: android
create_revision: b0850beeb25f6d5b10426284f506557f66181b36 create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: b0850beeb25f6d5b10426284f506557f66181b36 base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
- platform: web - platform: web
create_revision: b0850beeb25f6d5b10426284f506557f66181b36 create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: b0850beeb25f6d5b10426284f506557f66181b36 base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
- platform: windows - platform: windows
create_revision: b0850beeb25f6d5b10426284f506557f66181b36 create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
base_revision: b0850beeb25f6d5b10426284f506557f66181b36 base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49
# User provided section # User provided section

View File

@ -1,25 +1,26 @@
plugins { plugins {
id "com.android.application" id "com.android.application"
id "kotlin-android" id "kotlin-android"
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id "dev.flutter.flutter-gradle-plugin" id "dev.flutter.flutter-gradle-plugin"
} }
def localProperties = new Properties() def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties') def localPropertiesFile = rootProject.file("local.properties")
if (localPropertiesFile.exists()) { if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader -> localPropertiesFile.withReader("UTF-8") { reader ->
localProperties.load(reader) localProperties.load(reader)
} }
} }
def flutterVersionCode = localProperties.getProperty('flutter.versionCode') def flutterVersionCode = localProperties.getProperty("flutter.versionCode")
if (flutterVersionCode == null) { if (flutterVersionCode == null) {
flutterVersionCode = '1' flutterVersionCode = "1"
} }
def flutterVersionName = localProperties.getProperty('flutter.versionName') def flutterVersionName = localProperties.getProperty("flutter.versionName")
if (flutterVersionName == null) { if (flutterVersionName == null) {
flutterVersionName = '1.0' flutterVersionName = "1.0"
} }
def keystoreProperties = new Properties() def keystoreProperties = new Properties()
@ -29,36 +30,23 @@ if (keystorePropertiesFile.exists()) {
} }
android { android {
namespace "com.example.ollama" namespace = "com.freakurl.apps.ollama"
compileSdk flutter.compileSdkVersion compileSdk = flutter.compileSdkVersion
ndkVersion flutter.ndkVersion ndkVersion = flutter.ndkVersion
dependenciesInfo {
includeInApk = false
includeInBundle = false
}
compileOptions { compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8 sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
} }
defaultConfig { defaultConfig {
applicationId "com.freakurl.apps.ollama" applicationId = "com.freakurl.apps.ollama"
// You can update the following values to match your application needs. // You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion flutter.minSdkVersion minSdk = flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion targetSdk = flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger() versionCode = flutterVersionCode.toInteger()
versionName flutterVersionName versionName = flutterVersionName
} }
signingConfigs { signingConfigs {
@ -72,14 +60,11 @@ android {
buildTypes { buildTypes {
release { release {
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.release signingConfig signingConfigs.release
} }
} }
} }
flutter { flutter {
source '../..' source = "../.."
} }
dependencies {}

View File

@ -8,6 +8,7 @@
android:name=".MainActivity" android:name=".MainActivity"
android:exported="true" android:exported="true"
android:launchMode="singleTop" android:launchMode="singleTop"
android:taskAffinity=""
android:theme="@style/LaunchTheme" android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true" android:hardwareAccelerated="true"
@ -21,8 +22,8 @@
android:resource="@style/NormalTheme" android:resource="@style/NormalTheme"
/> />
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER"/>
</intent-filter> </intent-filter>
</activity> </activity>
<!-- Don't delete the meta-data below. <!-- Don't delete the meta-data below.
@ -32,31 +33,31 @@
android:value="2" /> android:value="2" />
</application> </application>
<!-- Required to query activities that can process text, see: <!-- Required to query activities that can process text, see:
https://developer.android.com/training/package-visibility?hl=en and https://developer.android.com/training/package-visibility and
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT. https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. --> In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
<queries> <queries>
<intent> <intent>
<action android:name="android.intent.action.PROCESS_TEXT" /> <action android:name="android.intent.action.PROCESS_TEXT"/>
<data android:mimeType="text/plain" /> <data android:mimeType="text/plain"/>
</intent> </intent>
<!-- check if url is valid --> <!-- check if url is valid -->
<intent> <intent>
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW"/>
<data android:scheme="http" /> <data android:scheme="http"/>
</intent> </intent>
<intent> <intent>
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW"/>
<data android:scheme="https"/> <data android:scheme="https"/>
</intent> </intent>
<!-- check if url is valid end --> <!-- check if url is valid end -->
<!-- voice mode --> <!-- voice mode -->
<intent> <intent>
<action android:name="android.speech.RecognitionService" /> <action android:name="android.speech.RecognitionService"/>
</intent> </intent>
<intent> <intent>
<action android:name="android.intent.action.TTS_SERVICE" /> <action android:name="android.intent.action.TTS_SERVICE"/>
</intent> </intent>
<!-- voice mode end--> <!-- voice mode end-->
</queries> </queries>

View File

@ -1,4 +1,4 @@
package com.example.ollama package com.freakurl.apps.ollama
import io.flutter.embedding.android.FlutterActivity import io.flutter.embedding.android.FlutterActivity

View File

@ -5,12 +5,12 @@ allprojects {
} }
} }
rootProject.buildDir = '../build' rootProject.buildDir = "../build"
subprojects { subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}" project.buildDir = "${rootProject.buildDir}/${project.name}"
} }
subprojects { subprojects {
project.evaluationDependsOn(':app') project.evaluationDependsOn(":app")
} }
tasks.register("clean", Delete) { tasks.register("clean", Delete) {

View File

@ -1,3 +1,3 @@
org.gradle.jvmargs=-Xmx4G org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true

View File

@ -5,10 +5,9 @@ pluginManagement {
def flutterSdkPath = properties.getProperty("flutter.sdk") def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties" assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath return flutterSdkPath
} }()
settings.ext.flutterSdkPath = flutterSdkPath()
includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
repositories { repositories {
google() google()