Merge branch 'remove-jars' into 'master'

Remove upstream jar files from all modules except briar-desktop

This also adds a script for running tests without the Android SDK installed

I've tried to find a better way to do this by conditionally including
the briar-android project in settings.gradle, but failed.
Please note that gradle needs to be installed to run the tests by
executing:
```
./run-tests-without-android.sh
```

See merge request !59
This commit is contained in:
akwizgran
2016-01-18 12:52:44 +00:00
18 changed files with 103 additions and 26 deletions

View File

@@ -6,9 +6,7 @@ repositories {
}
dependencies {
compile fileTree(dir: '../briar-api/libs', include: '*.jar')
compile project(':briar-api')
compile fileTree(dir: '../briar-core/libs', include: '*.jar')
compile project(':briar-core')
compile fileTree(dir: 'libs', include: '*.jar')
compile "com.android.support:support-v4:23.1.1"
@@ -16,6 +14,8 @@ dependencies {
compile "com.android.support:preference-v7:23.1.1"
compile "com.android.support:preference-v14:23.1.1"
compile "com.android.support:design:23.1.1"
compile "org.roboguice:roboguice:2.0"
compile "org.connectbot.jsocks:jsocks:1.0.0"
compile "info.guardianproject.panic:panic:0.5"
compile "info.guardianproject.trustedintents:trustedintents:0.2"
}
@@ -29,6 +29,8 @@ dependencyVerification {
'com.android.support:design:41a9cd75ca78f25df5f573db7cedf8bb66beae00c330943923ba9f3e2051736d',
'com.android.support:support-annotations:f347a35b9748a4103b39a6714a77e2100f488d623fd6268e259c177b200e9d82',
'com.android.support:recyclerview-v7:7606373da0931a1e62588335465a0e390cd676c98117edab29220317495faefd',
'org.roboguice:roboguice:c5302f2648170ee6015a0d18fe0fcc87e09e415a34aeae3566e8d1a9dbb53f28',
'org.connectbot.jsocks:jsocks:4ae46cd23dfd2496e90a9cde5cd32884ec8b3871a8815dbf425dca224cbc2589',
'info.guardianproject.panic:panic:a7ed9439826db2e9901649892cf9afbe76f00991b768d8f4c26332d7c9406cb2',
'info.guardianproject.trustedintents:trustedintents:6221456d8821a8d974c2acf86306900237cf6afaaa94a4c9c44e161350f80f3e',
]

Binary file not shown.

Binary file not shown.

View File

@@ -46,8 +46,8 @@ import java.util.logging.Logger;
import java.util.regex.Pattern;
import java.util.zip.ZipInputStream;
import socks.Socks5Proxy;
import socks.SocksSocket;
import net.sourceforge.jsocks.Socks5Proxy;
import net.sourceforge.jsocks.SocksSocket;
import static android.content.Context.CONNECTIVITY_SERVICE;
import static android.content.Context.MODE_PRIVATE;

View File

@@ -2,8 +2,25 @@ apply plugin: 'java'
sourceCompatibility = 1.6
targetCompatibility = 1.6
apply plugin: 'witness'
repositories {
jcenter()
}
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
compile "javax.inject:javax.inject:1"
compile "com.google.inject:guice:3.0:no_aop"
}
dependencyVerification {
verify = [
'javax.inject:javax.inject:91c77044a50c481636c32d916fd89c9118a72195390452c81065080f957de7ff',
'com.google.inject:guice:7c0624d0986ae2bd7a8f1cf4789bcaae5b82a042a7e3d27ba3041ed7b7f2cd3a',
'aopalliance:aopalliance:0addec670fedcd3f113c5c8091d783280d23f75e3acb841b61a9cdb079376a08',
'org.sonatype.sisu.inject:cglib:42e1dfb26becbf1a633f25b47e39fcc422b85e77e4c0468d9a44f885f5fa0be2',
'asm:asm:333ff5369043975b7e031b8b27206937441854738e038c1f47f98d072a20437a',
]
}
sourceSets {

Binary file not shown.

Binary file not shown.

View File

@@ -2,10 +2,24 @@ apply plugin: 'java'
sourceCompatibility = 1.6
targetCompatibility = 1.6
apply plugin: 'witness'
repositories {
jcenter()
}
dependencies {
compile fileTree(dir: '../briar-api/libs', include: '*.jar')
compile project(':briar-api')
compile fileTree(dir: 'libs', include: '*.jar')
compile "com.madgag.spongycastle:core:1.54.0.0"
compile "com.h2database:h2:1.4.190"
}
dependencyVerification {
verify = [
'com.madgag.spongycastle:core:1e7fa4b19ccccd1011364ab838d0b4702470c178bbbdd94c5c90b2d4d749ea1e',
'com.h2database:h2:23ba495a07bbbb3bd6c3084d10a96dad7a23741b8b6d64b213459a784195a98c',
]
}
sourceSets {

Binary file not shown.

Binary file not shown.

View File

@@ -2,8 +2,13 @@ apply plugin: 'java'
sourceCompatibility = 1.6
targetCompatibility = 1.6
apply plugin: 'witness'
repositories {
jcenter()
}
dependencies {
compile fileTree(dir: '../briar-api/libs', include: '*.jar')
compile project(':briar-api')
compile fileTree(dir: '../briar-core/libs', include: '*.jar')
compile project(':briar-core')

View File

@@ -2,14 +2,31 @@ apply plugin: 'java'
sourceCompatibility = 1.6
targetCompatibility = 1.6
apply plugin: 'witness'
repositories {
jcenter()
}
dependencies {
compile fileTree(dir: '../briar-api/libs', include: '*.jar')
compile project(':briar-api')
compile fileTree(dir: '../briar-core/libs', include: '*.jar')
compile project(':briar-core')
compile fileTree(dir: '../briar-desktop/libs', include: '*.jar')
compile project(':briar-desktop')
compile fileTree(dir: 'libs', include: '*.jar')
compile "junit:junit:4.12"
compile "org.jmock:jmock:2.8.1"
compile "org.hamcrest:hamcrest-library:1.3"
compile "org.hamcrest:hamcrest-core:1.3"
}
dependencyVerification {
verify = [
'junit:junit:59721f0805e223d84b90677887d9ff567dc534d7c502ca903c0c2b17f05c116a',
'org.jmock:jmock:75d4bdaf636879f0215830c5e6ab99407069a625eaffde5d57b32d887b75dc14',
'org.hamcrest:hamcrest-library:711d64522f9ec410983bd310934296da134be4254a125080a0416ec178dfad1c',
'org.hamcrest:hamcrest-core:66fdef91e9739348df7a096aa384a5685f4e875584cce89386a7a47251c4d8e9',
]
}
sourceSets {

Binary file not shown.

Binary file not shown.

View File

@@ -19,6 +19,7 @@ import org.briarproject.api.ui.UiCallback;
import org.briarproject.system.SystemClock;
import org.jmock.Expectations;
import org.jmock.Mockery;
import org.jmock.lib.concurrent.Synchroniser;
import org.junit.Test;
import java.util.Arrays;
@@ -32,7 +33,9 @@ public class PluginManagerImplTest extends BriarTestCase {
@Test
public void testStartAndStop() throws Exception {
Clock clock = new SystemClock();
Mockery context = new Mockery();
Mockery context = new Mockery() {{
setThreadingPolicy(new Synchroniser());
}};
final Executor ioExecutor = Executors.newCachedThreadPool();
final EventBus eventBus = context.mock(EventBus.class);
final SimplexPluginConfig simplexPluginConfig =

View File

@@ -9,6 +9,7 @@ import org.briarproject.plugins.ImmediateExecutor;
import org.briarproject.plugins.file.RemovableDriveMonitor.Callback;
import org.jmock.Expectations;
import org.jmock.Mockery;
import org.jmock.lib.concurrent.Synchroniser;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -42,7 +43,9 @@ public class RemovableDrivePluginTest extends BriarTestCase {
public void testWriterIsNullIfNoDrivesAreFound() throws Exception {
final List<File> drives = Collections.emptyList();
Mockery context = new Mockery();
Mockery context = new Mockery() {{
setThreadingPolicy(new Synchroniser());
}};
final Executor executor = context.mock(Executor.class);
final SimplexPluginCallback callback =
context.mock(SimplexPluginCallback.class);
@@ -74,7 +77,9 @@ public class RemovableDrivePluginTest extends BriarTestCase {
drives.add(drive1);
drives.add(drive2);
Mockery context = new Mockery();
Mockery context = new Mockery() {{
setThreadingPolicy(new Synchroniser());
}};
final Executor executor = context.mock(Executor.class);
final SimplexPluginCallback callback =
context.mock(SimplexPluginCallback.class);
@@ -88,7 +93,7 @@ public class RemovableDrivePluginTest extends BriarTestCase {
oneOf(finder).findRemovableDrives();
will(returnValue(drives));
oneOf(callback).showChoice(with(any(String[].class)),
with(any(String.class)));
with(any(String[].class)));
will(returnValue(-1)); // The user cancelled the choice
}});
@@ -111,7 +116,9 @@ public class RemovableDrivePluginTest extends BriarTestCase {
drives.add(drive1);
drives.add(drive2);
Mockery context = new Mockery();
Mockery context = new Mockery() {{
setThreadingPolicy(new Synchroniser());
}};
final Executor executor = context.mock(Executor.class);
final SimplexPluginCallback callback =
context.mock(SimplexPluginCallback.class);
@@ -125,7 +132,7 @@ public class RemovableDrivePluginTest extends BriarTestCase {
oneOf(finder).findRemovableDrives();
will(returnValue(drives));
oneOf(callback).showChoice(with(any(String[].class)),
with(any(String.class)));
with(any(String[].class)));
will(returnValue(0)); // The user chose drive1 but it doesn't exist
}});
@@ -150,7 +157,9 @@ public class RemovableDrivePluginTest extends BriarTestCase {
// Create drive1 as a file rather than a directory
assertTrue(drive1.createNewFile());
Mockery context = new Mockery();
Mockery context = new Mockery() {{
setThreadingPolicy(new Synchroniser());
}};
final Executor executor = context.mock(Executor.class);
final SimplexPluginCallback callback =
context.mock(SimplexPluginCallback.class);
@@ -164,7 +173,7 @@ public class RemovableDrivePluginTest extends BriarTestCase {
oneOf(finder).findRemovableDrives();
will(returnValue(drives));
oneOf(callback).showChoice(with(any(String[].class)),
with(any(String.class)));
with(any(String[].class)));
will(returnValue(0)); // The user chose drive1 but it's not a dir
}});
@@ -189,7 +198,9 @@ public class RemovableDrivePluginTest extends BriarTestCase {
// Create drive1 as a directory
assertTrue(drive1.mkdir());
Mockery context = new Mockery();
Mockery context = new Mockery() {{
setThreadingPolicy(new Synchroniser());
}};
final Executor executor = context.mock(Executor.class);
final SimplexPluginCallback callback =
context.mock(SimplexPluginCallback.class);
@@ -203,7 +214,7 @@ public class RemovableDrivePluginTest extends BriarTestCase {
oneOf(finder).findRemovableDrives();
will(returnValue(drives));
oneOf(callback).showChoice(with(any(String[].class)),
with(any(String.class)));
with(any(String[].class)));
will(returnValue(0)); // The user chose drive1
}});
@@ -231,7 +242,9 @@ public class RemovableDrivePluginTest extends BriarTestCase {
// Create drive1 as a directory
assertTrue(drive1.mkdir());
Mockery context = new Mockery();
Mockery context = new Mockery() {{
setThreadingPolicy(new Synchroniser());
}};
final Executor executor = context.mock(Executor.class);
final SimplexPluginCallback callback =
context.mock(SimplexPluginCallback.class);
@@ -245,9 +258,9 @@ public class RemovableDrivePluginTest extends BriarTestCase {
oneOf(finder).findRemovableDrives();
will(returnValue(drives));
oneOf(callback).showChoice(with(any(String[].class)),
with(any(String.class)));
with(any(String[].class)));
will(returnValue(0)); // The user chose drive1
oneOf(callback).showMessage(with(any(String.class)));
oneOf(callback).showMessage(with(any(String[].class)));
}});
RemovableDrivePlugin plugin = new RemovableDrivePlugin(executor,
@@ -276,7 +289,9 @@ public class RemovableDrivePluginTest extends BriarTestCase {
@Test
public void testEmptyDriveIsIgnored() throws Exception {
Mockery context = new Mockery();
Mockery context = new Mockery() {{
setThreadingPolicy(new Synchroniser());
}};
final Executor executor = context.mock(Executor.class);
final SimplexPluginCallback callback =
context.mock(SimplexPluginCallback.class);
@@ -300,7 +315,9 @@ public class RemovableDrivePluginTest extends BriarTestCase {
@Test
public void testFilenames() {
Mockery context = new Mockery();
Mockery context = new Mockery() {{
setThreadingPolicy(new Synchroniser());
}};
final Executor executor = context.mock(Executor.class);
final SimplexPluginCallback callback =
context.mock(SimplexPluginCallback.class);
@@ -324,7 +341,9 @@ public class RemovableDrivePluginTest extends BriarTestCase {
@Test
public void testReaderIsCreated() throws Exception {
Mockery context = new Mockery();
Mockery context = new Mockery() {{
setThreadingPolicy(new Synchroniser());
}};
final SimplexPluginCallback callback =
context.mock(SimplexPluginCallback.class);
final RemovableDriveFinder finder =