mirror of
https://github.com/MetaCubeX/ClashMetaForAndroid.git
synced 2024-11-22 05:16:08 +03:00
Refactor: refactor golang flavor
This commit is contained in:
parent
11c4e19e0c
commit
e364af393a
6
.gitignore
vendored
6
.gitignore
vendored
@ -20,10 +20,8 @@ gradle-app.setting
|
|||||||
*.iml
|
*.iml
|
||||||
/.idea/*
|
/.idea/*
|
||||||
!/.idea/codeStyles
|
!/.idea/codeStyles
|
||||||
/core/src/foss/go/.idea/*
|
/core/src/main/golang/.idea/*
|
||||||
!/core/src/foss/go/.idea/codeStyles
|
!/core/src/main/golang/.idea/codeStyles
|
||||||
/core/src/premium/go/.idea/*
|
|
||||||
!/core/src/premium/go/.idea/codeStyles
|
|
||||||
|
|
||||||
# KeyStore
|
# KeyStore
|
||||||
*.keystore
|
*.keystore
|
||||||
|
5
.gitmodules
vendored
5
.gitmodules
vendored
@ -1,3 +1,6 @@
|
|||||||
[submodule "clash-foss"]
|
[submodule "clash-foss"]
|
||||||
path = core/src/foss/go/clash
|
path = core/src/main/golang/core/foss
|
||||||
|
url = https://github.com/Kr328/clash.git
|
||||||
|
[submodule "clash-premium"]
|
||||||
|
path = core/src/main/golang/core/premium
|
||||||
url = https://github.com/Kr328/clash.git
|
url = https://github.com/Kr328/clash.git
|
||||||
|
@ -18,13 +18,15 @@ val geoipOutput = buildDir.resolve("intermediates/golang_blob")
|
|||||||
golang {
|
golang {
|
||||||
sourceSets {
|
sourceSets {
|
||||||
create("foss") {
|
create("foss") {
|
||||||
srcDir.set(file("src/foss/go"))
|
tags.set(listOf("foss"))
|
||||||
}
|
}
|
||||||
create("premium") {
|
create("premium") {
|
||||||
srcDir.set(file("src/premium/go"))
|
tags.set(listOf("premium"))
|
||||||
|
moduleFile.set("go.premium.mod")
|
||||||
}
|
}
|
||||||
all {
|
all {
|
||||||
fileName.set("libclash.so")
|
fileName.set("libclash.so")
|
||||||
|
srcDir.set(file("src/main/golang"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
1
core/src/main/golang/core/premium
Submodule
1
core/src/main/golang/core/premium
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit fab0b09292f0d3caf46db5150c969243e35f2ee9
|
@ -1,4 +1,4 @@
|
|||||||
package core
|
package delegate
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
@ -13,6 +13,6 @@ require (
|
|||||||
gopkg.in/yaml.v2 v2.4.0
|
gopkg.in/yaml.v2 v2.4.0
|
||||||
)
|
)
|
||||||
|
|
||||||
replace github.com/Dreamacro/clash => ./clash
|
replace github.com/Dreamacro/clash => ./core/foss
|
||||||
|
|
||||||
replace cfa/blob => ../../../build/intermediates/golang_blob
|
replace cfa/blob => ../../../build/intermediates/golang_blob
|
@ -11,7 +11,7 @@ import (
|
|||||||
"runtime"
|
"runtime"
|
||||||
|
|
||||||
"cfa/config"
|
"cfa/config"
|
||||||
"cfa/core"
|
"cfa/delegate"
|
||||||
"cfa/tunnel"
|
"cfa/tunnel"
|
||||||
|
|
||||||
"github.com/Dreamacro/clash/log"
|
"github.com/Dreamacro/clash/log"
|
||||||
@ -27,7 +27,7 @@ func coreInit(home, versionName C.c_string, sdkVersion C.int) {
|
|||||||
v := C.GoString(versionName)
|
v := C.GoString(versionName)
|
||||||
s := int(sdkVersion)
|
s := int(sdkVersion)
|
||||||
|
|
||||||
core.Init(h, v, s)
|
delegate.Init(h, v, s)
|
||||||
|
|
||||||
reset()
|
reset()
|
||||||
}
|
}
|
@ -17,7 +17,7 @@ dependencyResolutionManagement {
|
|||||||
val agp = "7.0.2"
|
val agp = "7.0.2"
|
||||||
val ksp = "1.5.30-1.0.0-beta09"
|
val ksp = "1.5.30-1.0.0-beta09"
|
||||||
val kotlin = "1.5.30"
|
val kotlin = "1.5.30"
|
||||||
val golang = "1.0.1"
|
val golang = "1.0.2"
|
||||||
val coroutine = "1.5.0"
|
val coroutine = "1.5.0"
|
||||||
val coreKtx = "1.5.0"
|
val coreKtx = "1.5.0"
|
||||||
val activity = "1.2.3"
|
val activity = "1.2.3"
|
||||||
|
Loading…
Reference in New Issue
Block a user