Skip to content

Commit e8e5ef8

Browse files
committed
app, dapp: flutter_3_32_7 upgrade
1 parent c14a849 commit e8e5ef8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+22893
-1177
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- uses: actions/setup-java@v4
2727
with:
2828
distribution: 'temurin'
29-
java-version: '11'
29+
java-version: '17'
3030

3131
- run: ./app-flutter.sh orchid && cd app-flutter && make
3232

@@ -165,7 +165,7 @@ jobs:
165165

166166
- run: DEBIAN_FRONTEND=noninteractive sudo -EH apt-get -y install mingw-w64
167167

168-
- run: debug=crossndk make -j3 -C app-windows ./env/dotdot/gui-orchid/.flutter-plugins
168+
- run: debug=crossndk make -j3 -C app-windows ./env/dotdot/gui-orchid/.flutter-plugins-dependencies
169169
- run: debug=crossndk make -j3 -C app-windows target=win precache='--no-android --no-ios --windows -a'
170170

171171
- uses: actions/upload-artifact@v4
@@ -246,7 +246,7 @@ jobs:
246246
- run: env/setup.sh
247247
- uses: ./.github/actions/submodule
248248

249-
- run: debug=crossndk make -j3 -C app-linux ./env/dotdot/gui-orchid/.flutter-plugins
249+
- run: debug=crossndk make -j3 -C app-linux ./env/dotdot/gui-orchid/.flutter-plugins-dependencies
250250
- run: debug=crossndk make -j3 -C app-linux precache='--no-android --no-ios --linux'
251251

252252
- uses: actions/upload-artifact@v4

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,6 @@
157157
[submodule "chains"]
158158
path = lib-protocol/chains
159159
url = https://github.com/ethereum-lists/chains.git
160-
[submodule "engine"]
161-
path = app-shared/engine
162-
url = https://github.com/flutter/engine.git
163160
[submodule "vpn-libraries"]
164161
path = min-krypton/vpn-libraries
165162
url = https://github.com/google/vpn-libraries.git

app-android/build.gradle

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
buildscript {
2-
ext.kotlin_version = '1.8.0'
2+
ext.kotlin_version = '1.8.10'
33
repositories {
44
google()
55
mavenCentral()
66
}
77

88
dependencies {
9-
classpath 'com.android.tools.build:gradle:7.3.0'
9+
classpath 'com.android.tools.build:gradle:8.7.0'
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1111
}
1212
}
@@ -27,10 +27,15 @@ subprojects {
2727
apply plugin: 'com.android.application'
2828
apply plugin: 'kotlin-android'
2929

30-
def flutter = files(orcFlutter)
30+
def flutterFile = files(orcFlutter)
31+
32+
ext {
33+
flutter = [compileSdkVersion: 34]
34+
}
3135

3236
android {
33-
compileSdkVersion 34
37+
namespace "net.orchid.Orchid"
38+
compileSdkVersion flutter.compileSdkVersion
3439

3540
defaultConfig {
3641
applicationId orcUnique
@@ -65,6 +70,14 @@ android {
6570
targetCompatibility 1.8
6671
}
6772

73+
kotlinOptions {
74+
jvmTarget = "1.8"
75+
}
76+
77+
buildFeatures {
78+
buildConfig true
79+
}
80+
6881
sourceSets {
6982
main {
7083
java.srcDirs += [orcInterface + "/android/app/src/main/java"]
@@ -75,7 +88,7 @@ android {
7588
}
7689

7790
dependencies {
78-
implementation flutter
91+
implementation flutterFile
7992
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
8093

8194
implementation "androidx.activity:activity:1.8.1"
@@ -105,19 +118,19 @@ plugins.plugins.android.each { dependency ->
105118
}
106119

107120
plugin.afterEvaluate {
108-
plugin.android { compileSdkVersion 34 }
121+
plugin.android { compileSdkVersion flutter.compileSdkVersion }
109122

110123
plugin.android.buildTypes {
111124
profile {
112125
initWith debug
113126
}
114127
}
115128
plugin.dependencies {
116-
compileOnly flutter
129+
compileOnly flutterFile
117130

118-
// https://github.com/flutter/flutter/issues/56686
119-
// WakelockPlugin.kt: Unresolved reference: NonNull
120131
implementation "androidx.annotation:annotation:1.0.0"
132+
implementation "com.android.support:support-annotations:28.0.0"
133+
implementation "org.jetbrains:annotations:24.0.1"
121134
}
122135
}
123136
}

app-android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
org.gradle.jvmargs=-Xmx1536M
1+
org.gradle.jvmargs=-Xmx3G
22
android.enableJetifier=true
33
android.useAndroidX=true
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

app-android/local.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
flutter.sdk=shared/flutter

app-android/makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,12 @@ $(word 1,$(keystore)).keystore:
7777
endif
7878

7979
$(apk): $(shell find src/main/kotlin -name '*.kt') $(shell find src/main/java -name '*.java') $(shell find src/main/res) build.gradle $(word 1,$(keystore)).keystore src/main/AndroidManifest.xml $(temp) $(subst %,.,$(generated)) $(output)/assets/flutter_assets/AssetManifest.json $(pwd/flutter)/bin/cache/artifacts/engine/android-arm-release/flutter.jar
80-
@./gradlew -Pandroid.debug.obsoleteApi=true assemble$(if $(filter noaot,$(debug)),Debug,Release) --console verbose --warning-mode all \
81-
-PorcUnique='$(domain).$(name)' -PorcName='$(name)' -PorcOutput='$(output)' \
80+
@FLUTTER_ROOT=$(CURDIR)/shared/flutter ./gradlew assemble$(if $(filter noaot,$(debug)),Debug,Release) \
81+
-Pandroid.debug.obsoleteApi=true --console verbose --warning-mode all \
8282
-PorcStore='$(word 1,$(keystore)).keystore' -PorcAlias='$(word 2,$(keystore))' -PorcPassword='$(word 3,$(keystore))' \
8383
-PorcMonotonic='$(monotonic)' -PorcRevision='$(revision)' -PorcPackage='$(package)' -PorcVersion='$(version)' \
84-
-PorcFlutter=$(pwd/flutter)/bin/cache/artifacts/engine/$(flutter/$(machine))$(engine)/flutter.jar -PorcInterface='$(pwd/gui)'
84+
-PorcFlutter=$(pwd/flutter)/bin/cache/artifacts/engine/$(flutter/$(machine))$(engine)/flutter.jar \
85+
-PorcUnique='$(domain).$(name)' -PorcName='$(name)' -PorcOutput='$(output)' -PorcInterface='$(pwd/gui)'
8586
exit 0
8687
touch $@
8788

app-android/settings.gradle

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
1-
def root = rootProject.projectDir.toPath()
2-
3-
def plugins = new Properties()
4-
def file = file(orcInterface + "/.flutter-plugins")
5-
if (file.exists()) {
6-
file.withReader('UTF-8') { reader -> plugins.load(reader) }
7-
}
8-
9-
plugins.each { name, path ->
10-
def plugin = root.resolve(path).resolve('android').toFile()
11-
include ":$name"
12-
project(":$name").projectDir = plugin
1+
import groovy.json.JsonSlurper
2+
def plugins = new JsonSlurper().parseText(file(orcInterface + "/.flutter-plugins-dependencies").text)
3+
plugins.plugins.android.each { dependency ->
4+
include ":${dependency.name}"
5+
project(":${dependency.name}").projectDir = file("${dependency.path}/android")
136
}

app-android/src/main/AndroidManifest.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="net.orchid.Orchid"
3-
>
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
42
<uses-permission android:name="android.permission.INTERNET"/>
53
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
64
<uses-permission android:name="android.permission.CAMERA" />

app-android/src/main/kotlin/net/orchid/Orchid/MainActivity.kt

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import io.flutter.embedding.android.FlutterActivity
1111
import io.flutter.embedding.engine.FlutterEngine
1212
import io.flutter.plugin.common.MethodChannel
1313
import io.flutter.plugins.GeneratedPluginRegistrant
14-
import io.flutter.view.FlutterMain
1514

1615
import android.content.Intent;
1716
import android.net.VpnService;
@@ -87,18 +86,4 @@ class MainActivity(): FlutterActivity() {
8786
private fun configFile(): File {
8887
return File(filesDir.absolutePath + "/orchid.cfg");
8988
}
90-
91-
fun copyTo(ins: InputStream, dst: File) {
92-
ins.use { ins ->
93-
val out = FileOutputStream(dst)
94-
out.use { out ->
95-
// Transfer bytes from in to out
96-
val buf = ByteArray(4096)
97-
var len: Int = 0
98-
while ({ len = ins.read(buf); len }() > 0) {
99-
out.write(buf, 0, len)
100-
}
101-
}
102-
}
103-
}
10489
}

0 commit comments

Comments
 (0)