Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial draft for porting this project to Gradle + Kotlin
This is one of my stupidest idea ever.
- Loading branch information
Showing
206 changed files
with
7,885 additions
and
7,475 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,31 @@ | ||
target | ||
# Gradle & Android Studio | ||
local.properties | ||
local.sbt | ||
/proguard-sbt.txt | ||
.gradle/ | ||
.externalNativeBuild/ | ||
build/ | ||
captures/ | ||
|
||
#Intellij IDEA | ||
.idea/ | ||
.d | ||
gen/ | ||
*.iml | ||
|
||
mobile/src/main/libs | ||
mobile/src/main/obj | ||
mobile/src/main/jni/overture | ||
core/src/main/libs | ||
core/src/main/obj | ||
core/src/main/jni/overture | ||
|
||
mobile/src/overture/.deps | ||
mobile/src/overture/bin | ||
mobile/src/overture/pkg | ||
core/src/overture/.deps | ||
core/src/overture/bin | ||
core/src/overture/pkg | ||
|
||
mobile/src/overture/src/github.com/Sirupsen | ||
mobile/src/overture/src/github.com/mattn | ||
mobile/src/overture/src/github.com/miekg | ||
mobile/src/overture/src/github.com/shawn1m | ||
mobile/src/overture/src/github.com/tools | ||
mobile/src/overture/src/golang.org | ||
mobile/src/overture/src/gopkg.in | ||
core/src/overture/src/github.com/Sirupsen | ||
core/src/overture/src/github.com/mattn | ||
core/src/overture/src/github.com/miekg | ||
core/src/overture/src/github.com/shawn1m | ||
core/src/overture/src/github.com/tools | ||
core/src/overture/src/golang.org | ||
core/src/overture/src/gopkg.in | ||
|
||
# work in progress | ||
tv/ | ||
things/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,38 @@ | ||
[submodule "mobile/src/main/jni/shadowsocks-libev"] | ||
path = mobile/src/main/jni/shadowsocks-libev | ||
[submodule "core/src/main/jni/shadowsocks-libev"] | ||
path = core/src/main/jni/shadowsocks-libev | ||
url = https://github.com/shadowsocks/shadowsocks-libev | ||
[submodule "mobile/src/main/jni/badvpn"] | ||
path = mobile/src/main/jni/badvpn | ||
[submodule "core/src/main/jni/badvpn"] | ||
path = core/src/main/jni/badvpn | ||
url = https://github.com/shadowsocks/badvpn.git | ||
branch = shadowsocks-android | ||
[submodule "mobile/src/main/jni/libancillary"] | ||
path = mobile/src/main/jni/libancillary | ||
[submodule "core/src/main/jni/libancillary"] | ||
path = core/src/main/jni/libancillary | ||
url = https://github.com/shadowsocks/libancillary.git | ||
branch = shadowsocks-android | ||
[submodule "mobile/src/main/jni/libevent"] | ||
path = mobile/src/main/jni/libevent | ||
[submodule "core/src/main/jni/libevent"] | ||
path = core/src/main/jni/libevent | ||
url = https://github.com/shadowsocks/libevent.git | ||
branch = shadowsocks-android | ||
[submodule "mobile/src/main/jni/redsocks"] | ||
path = mobile/src/main/jni/redsocks | ||
[submodule "core/src/main/jni/redsocks"] | ||
path = core/src/main/jni/redsocks | ||
url = https://github.com/shadowsocks/redsocks.git | ||
branch = shadowsocks-android | ||
[submodule "mobile/src/main/jni/mbedtls"] | ||
path = mobile/src/main/jni/mbedtls | ||
[submodule "core/src/main/jni/mbedtls"] | ||
path = core/src/main/jni/mbedtls | ||
url = https://github.com/ARMmbed/mbedtls | ||
[submodule "mobile/src/main/jni/pcre"] | ||
path = mobile/src/main/jni/pcre | ||
[submodule "core/src/main/jni/pcre"] | ||
path = core/src/main/jni/pcre | ||
url = https://android.googlesource.com/platform/external/pcre | ||
[submodule "mobile/src/main/jni/libsodium"] | ||
path = mobile/src/main/jni/libsodium | ||
[submodule "core/src/main/jni/libsodium"] | ||
path = core/src/main/jni/libsodium | ||
url = https://github.com/jedisct1/libsodium.git | ||
branch = stable | ||
[submodule "mobile/src/main/jni/libev"] | ||
path = mobile/src/main/jni/libev | ||
[submodule "core/src/main/jni/libev"] | ||
path = core/src/main/jni/libev | ||
url = https://github.com/shadowsocks/libev.git | ||
[submodule "mobile/src/overture/go"] | ||
path = mobile/src/overture/go | ||
[submodule "core/src/overture/go"] | ||
path = core/src/overture/go | ||
url = https://github.com/shadowsocks/go.git | ||
[submodule "mobile/src/overture/src/github.com/shadowsocks/overture"] | ||
path = mobile/src/overture/src/github.com/shadowsocks/overture | ||
[submodule "core/src/overture/src/github.com/shadowsocks/overture"] | ||
path = core/src/overture/src/github.com/shadowsocks/overture | ||
url = https://github.com/shadowsocks/overture.git |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Top-level build file where you can add configuration options common to all sub-projects/modules. | ||
|
||
buildscript { | ||
ext { | ||
kotlinVersion = '1.2.0' | ||
minSdkVersion = 19 | ||
sdkVersion = 27 | ||
supportLibraryVersion = '27.0.2' | ||
takisoftFixVersion = '27.0.2.0' | ||
playServicesVersion = '11.6.2' | ||
junitVersion = '4.12' | ||
androidTestVersion = '1.0.1' | ||
androidEspressoVersion = '3.0.1' | ||
} | ||
|
||
repositories { | ||
google() | ||
jcenter() | ||
} | ||
dependencies { | ||
classpath 'com.android.tools.build:gradle:3.0.1' | ||
classpath 'com.google.gms:google-services:3.1.1' | ||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" | ||
} | ||
} | ||
|
||
allprojects { | ||
repositories { | ||
google() | ||
jcenter() | ||
} | ||
} | ||
|
||
task clean(type: Delete) { | ||
delete rootProject.buildDir | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
apply plugin: 'com.android.library' | ||
|
||
android { | ||
compileSdkVersion rootProject.sdkVersion | ||
|
||
defaultConfig { | ||
minSdkVersion rootProject.minSdkVersion | ||
targetSdkVersion rootProject.sdkVersion | ||
versionCode 1 | ||
versionName "1.0.0" | ||
|
||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | ||
|
||
externalNativeBuild { | ||
ndkBuild { | ||
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86' | ||
arguments "-j${Runtime.runtime.availableProcessors()}" | ||
} | ||
} | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
} | ||
} | ||
|
||
externalNativeBuild { | ||
ndkBuild { | ||
path 'src/main/jni/Android.mk' | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
api project(':plugin') | ||
testImplementation "junit:junit:$junitVersion" | ||
androidTestImplementation "com.android.support.test:runner:$androidTestVersion" | ||
androidTestImplementation "com.android.support.test.espresso:espresso-core:$androidEspressoVersion" | ||
} |
File renamed without changes.
File renamed without changes.
26 changes: 26 additions & 0 deletions
26
core/src/androidTest/java/com/github/shadowsocks/ExampleInstrumentedTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.github.shadowsocks; | ||
|
||
import android.content.Context; | ||
import android.support.test.InstrumentationRegistry; | ||
import android.support.test.runner.AndroidJUnit4; | ||
|
||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
/** | ||
* Instrumented test, which will execute on an Android device. | ||
* | ||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a> | ||
*/ | ||
@RunWith(AndroidJUnit4.class) | ||
public class ExampleInstrumentedTest { | ||
@Test | ||
public void useAppContext() throws Exception { | ||
// Context of the app under test. | ||
Context appContext = InstrumentationRegistry.getTargetContext(); | ||
|
||
assertEquals("com.github.shadowsockscorelibraries.test", appContext.getPackageName()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.github.shadowsocks.core"/> |
File renamed without changes.
File renamed without changes.
Submodule badvpn
updated
from 000000 to 58f8a8
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Submodule libev
updated
from 000000 to 521341
Submodule libevent
updated
from 000000 to f29f07
Submodule mbedtls
updated
from 000000 to 4f0929
Submodule pcre
updated
from 000000 to 222bbf
Submodule redsocks
updated
from 000000 to 274334
Submodule go
updated
from 000000 to b68d7f
File renamed without changes.
17 changes: 17 additions & 0 deletions
17
core/src/test/java/com/github/shadowsocks/ExampleUnitTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.github.shadowsocks; | ||
|
||
import org.junit.Test; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
/** | ||
* Example local unit test, which will execute on the development machine (host). | ||
* | ||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a> | ||
*/ | ||
public class ExampleUnitTest { | ||
@Test | ||
public void addition_isCorrect() throws Exception { | ||
assertEquals(4, 2 + 2); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Project-wide Gradle settings. | ||
|
||
# IDE (e.g. Android Studio) users: | ||
# Gradle settings configured through the IDE *will override* | ||
# any settings specified in this file. | ||
|
||
# For more details on how to configure your build environment visit | ||
# http://www.gradle.org/docs/current/userguide/build_environment.html | ||
|
||
# Specifies the JVM arguments used for the daemon process. | ||
# The setting is particularly useful for tweaking memory settings. | ||
org.gradle.jvmargs=-Xmx1536m | ||
|
||
# When configured, Gradle will run in incubating parallel mode. | ||
# This option should only be used with decoupled projects. More details, visit | ||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects | ||
# org.gradle.parallel=true |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#Fri Dec 01 17:03:17 PST 2017 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip |
Oops, something went wrong.