diff --git a/Android/app/build.gradle b/Android/app/build.gradle index ff2ea55f..ad822e07 100644 --- a/Android/app/build.gradle +++ b/Android/app/build.gradle @@ -24,14 +24,14 @@ android { storePassword keystoreProperties['storePassword'] } } - compileSdkVersion 33 - buildToolsVersion '33.0.0' + compileSdkVersion ANDROID_COMPILE_SDK_VERSION as int + buildToolsVersion ANDROID_BUILD_TOOLS_VERSION defaultConfig { applicationId "app.intra" // Firebase Crashlytics requires SDK version 16. - minSdkVersion 16 - targetSdkVersion 33 + minSdkVersion ANDROID_MIN_SDK_VERSION as int + targetSdkVersion ANDROID_TARGET_SDK_VERSION as int versionCode 64 versionName "1.3.7" vectorDrawables.useSupportLibrary = true diff --git a/Android/gradle.properties b/Android/gradle.properties index 915f0e66..4bd4909d 100644 --- a/Android/gradle.properties +++ b/Android/gradle.properties @@ -17,4 +17,10 @@ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true android.enableJetifier=true -android.useAndroidX=true \ No newline at end of file +android.useAndroidX=true + +ANDROID_COMPILE_SDK_VERSION=33 +ANDROID_BUILD_TOOLS_VERSION=33.0.0 + +ANDROID_MIN_SDK_VERSION=16 +ANDROID_TARGET_SDK_VERSION=33 diff --git a/Android/tun2socks/build.gradle b/Android/tun2socks/build.gradle index 58576560..9d199906 100644 --- a/Android/tun2socks/build.gradle +++ b/Android/tun2socks/build.gradle @@ -4,9 +4,9 @@ plugins { } android { - compileSdkVersion 33 + compileSdkVersion ANDROID_COMPILE_SDK_VERSION as int defaultConfig { - minSdkVersion 16 + minSdkVersion ANDROID_MIN_SDK_VERSION as int } } @@ -44,8 +44,8 @@ task ensureGoMobile(type: Exec, dependsOn: ensureBuildDir) { environment 'GOBIN', goBuildDir.getPath() commandLine('go', 'install', - 'golang.org/x/mobile/cmd/gomobile@latest', - 'golang.org/x/mobile/cmd/gobind@latest') + 'golang.org/x/mobile/cmd/gomobile', + 'golang.org/x/mobile/cmd/gobind') } // Invoke `gomobile bind` to build from `srcPackages` to `outputAAR`. @@ -63,7 +63,8 @@ task gobind(type: Exec, dependsOn: ensureGoMobile) { System.getenv('PATH') commandLine("${goBuildDir}/gomobile", 'bind', - '-target=android', '-androidapi=16', + '-target=android', + "-androidapi=${android.defaultConfig.minSdk}", '-o', outputAAR, *srcPackages) } diff --git a/go.mod b/go.mod index d793137d..d9b8bd37 100644 --- a/go.mod +++ b/go.mod @@ -7,13 +7,14 @@ require ( github.com/Jigsaw-Code/getsni v1.0.0 github.com/Jigsaw-Code/outline-sdk v0.0.7 github.com/eycorsican/go-tun2socks v1.16.11 - golang.org/x/mobile v0.0.0-20230922142353-e2f452493d57 - golang.org/x/net v0.15.0 - golang.org/x/sys v0.12.0 + golang.org/x/mobile v0.0.0-20231006135142-2b44d11868fe + golang.org/x/net v0.16.0 + golang.org/x/sys v0.13.0 ) require ( - golang.org/x/crypto v0.13.0 // indirect - golang.org/x/mod v0.12.0 // indirect - golang.org/x/tools v0.13.0 // indirect + golang.org/x/crypto v0.14.0 // indirect + golang.org/x/mod v0.13.0 // indirect + golang.org/x/sync v0.4.0 // indirect + golang.org/x/tools v0.14.0 // indirect ) diff --git a/go.sum b/go.sum index 4ce7b024..166b2e17 100644 --- a/go.sum +++ b/go.sum @@ -15,25 +15,25 @@ github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= -golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= -golang.org/x/mobile v0.0.0-20230922142353-e2f452493d57 h1:Q6NT8ckDYNcwmi/bmxe+XbiDMXqMRW1xFBtJ+bIpie4= -golang.org/x/mobile v0.0.0-20230922142353-e2f452493d57/go.mod h1:wEyOn6VvNW7tcf+bW/wBz1sehi2s2BZ4TimyR7qZen4= -golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= -golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/mobile v0.0.0-20231006135142-2b44d11868fe h1:lrXv4yHeD9FA8PSJATWowP1QvexpyAPWmPia+Kbzql8= +golang.org/x/mobile v0.0.0-20231006135142-2b44d11868fe/go.mod h1:BrnXpEObnFxpaT75Jo9hsCazwOWcp7nVIa8NNuH5cuA= +golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= +golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20191021144547-ec77196f6094/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= -golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= -golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/net v0.16.0 h1:7eBu7KsSvFDtSXUIDbh3aqlK4DPsZ1rByC8PFfBThos= +golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= +golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= -golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= +golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/tools.go b/tools.go index 3e8e1775..6b45bed1 100644 --- a/tools.go +++ b/tools.go @@ -20,5 +20,6 @@ package tools import ( - _ "golang.org/x/mobile/bind" + _ "golang.org/x/mobile/cmd/gobind" + _ "golang.org/x/mobile/cmd/gomobile" )