Refactor: refactor golang flavor
This commit is contained in:
@@ -18,13 +18,15 @@ val geoipOutput = buildDir.resolve("intermediates/golang_blob")
|
||||
golang {
|
||||
sourceSets {
|
||||
create("foss") {
|
||||
srcDir.set(file("src/foss/go"))
|
||||
tags.set(listOf("foss"))
|
||||
}
|
||||
create("premium") {
|
||||
srcDir.set(file("src/premium/go"))
|
||||
tags.set(listOf("premium"))
|
||||
moduleFile.set("go.premium.mod")
|
||||
}
|
||||
all {
|
||||
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
Submodule core/src/main/golang/core/premium added at fab0b09292
@@ -1,4 +1,4 @@
|
||||
package core
|
||||
package delegate
|
||||
|
||||
import (
|
||||
"errors"
|
||||
@@ -13,6 +13,6 @@ require (
|
||||
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
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"runtime"
|
||||
|
||||
"cfa/config"
|
||||
"cfa/core"
|
||||
"cfa/delegate"
|
||||
"cfa/tunnel"
|
||||
|
||||
"github.com/Dreamacro/clash/log"
|
||||
@@ -27,7 +27,7 @@ func coreInit(home, versionName C.c_string, sdkVersion C.int) {
|
||||
v := C.GoString(versionName)
|
||||
s := int(sdkVersion)
|
||||
|
||||
core.Init(h, v, s)
|
||||
delegate.Init(h, v, s)
|
||||
|
||||
reset()
|
||||
}
|
||||
Reference in New Issue
Block a user