Commit 98e2adf7 authored by akwizgran's avatar akwizgran

Fix Dagger setup, remove android-apt plugin.

parent 2a43e0b0
......@@ -26,6 +26,9 @@ android {
dependencies {
compile project(path: ':bramble-core', configuration: 'default')
compile fileTree(dir: 'libs', include: '*.jar')
annotationProcessor 'com.google.dagger:dagger-compiler:2.0.2'
provided 'javax.annotation:jsr250-api:1.0'
}
......
......@@ -6,7 +6,6 @@ apply plugin: 'witness'
dependencies {
compile "com.google.dagger:dagger:2.0.2"
compile 'com.google.dagger:dagger-compiler:2.0.2'
compile 'com.google.code.findbugs:jsr305:3.0.2'
testCompile 'junit:junit:4.12'
......@@ -20,11 +19,8 @@ dependencies {
dependencyVerification {
verify = [
'com.google.dagger:dagger:84c0282ed8be73a29e0475d639da030b55dee72369e58dd35ae7d4fe6243dcf9',
'com.google.dagger:dagger-compiler:b74bc9de063dd4c6400b232231f2ef5056145b8fbecbf5382012007dd1c071b3',
'com.google.code.findbugs:jsr305:766ad2a0783f2687962c8ad74ceecc38a28b9f72a2d085ee438b7813e928d0c7',
'javax.inject:javax.inject:91c77044a50c481636c32d916fd89c9118a72195390452c81065080f957de7ff',
'com.google.dagger:dagger-producers:99ec15e8a0507ba569e7655bc1165ee5e5ca5aa914b3c8f7e2c2458f724edd6b',
'com.google.guava:guava:d664fbfc03d2e5ce9cab2a44fb01f1d0bf9dfebeccc1a473b1f9ea31f79f6f99',
]
}
......
plugins {
id 'java'
id 'net.ltgt.apt' version '0.9'
id 'idea'
}
apply plugin: 'java'
sourceCompatibility = 1.6
targetCompatibility = 1.6
apply plugin: 'net.ltgt.apt'
apply plugin: 'idea'
apply plugin: 'witness'
dependencies {
......@@ -15,7 +12,11 @@ dependencies {
compile 'com.h2database:h2:1.4.192' // This is the last version that supports Java 1.6
compile 'org.bitlet:weupnp:0.1.4'
apt 'com.google.dagger:dagger-compiler:2.0.2'
testCompile project(path: ':bramble-api', configuration: 'testOutput')
testApt 'com.google.dagger:dagger-compiler:2.0.2'
}
dependencyVerification {
......
......@@ -2,6 +2,8 @@ apply plugin: 'java'
sourceCompatibility = 1.7
targetCompatibility = 1.7
apply plugin: 'net.ltgt.apt'
apply plugin: 'idea'
apply plugin: 'witness'
dependencies {
......@@ -10,6 +12,8 @@ dependencies {
compile 'net.java.dev.jna:jna:4.4.0'
compile 'net.java.dev.jna:jna-platform:4.4.0'
apt 'com.google.dagger:dagger-compiler:2.0.2'
testCompile project(path: ':bramble-core', configuration: 'testOutput')
}
......
......@@ -30,6 +30,8 @@ dependencies {
compile 'com.github.bumptech.glide:glide:3.8.0'
compile 'uk.co.samuelwall:material-tap-target-prompt:1.9.2'
annotationProcessor 'com.google.dagger:dagger-compiler:2.0.2'
provided 'javax.annotation:jsr250-api:1.0'
testCompile project(path: ':bramble-core', configuration: 'testOutput')
......
......@@ -7,9 +7,6 @@ import android.support.design.widget.TextInputLayout;
import android.widget.Button;
import android.widget.EditText;
import com.google.common.base.Strings;
import org.briarproject.bramble.api.identity.AuthorConstants;
import org.briarproject.briar.BuildConfig;
import org.briarproject.briar.R;
import org.briarproject.briar.android.TestBriarApplication;
......@@ -35,6 +32,8 @@ import static org.briarproject.bramble.api.crypto.PasswordStrengthEstimator.QUIT
import static org.briarproject.bramble.api.crypto.PasswordStrengthEstimator.QUITE_WEAK;
import static org.briarproject.bramble.api.crypto.PasswordStrengthEstimator.STRONG;
import static org.briarproject.bramble.api.crypto.PasswordStrengthEstimator.WEAK;
import static org.briarproject.bramble.api.identity.AuthorConstants.MAX_AUTHOR_NAME_LENGTH;
import static org.briarproject.bramble.util.StringUtils.getRandomString;
import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.anyString;
import static org.mockito.Matchers.eq;
......@@ -145,9 +144,7 @@ public class SetupActivityTest {
@Test
public void testNicknameUI() {
Assert.assertNotNull(setupActivity);
String longNick =
Strings.padEnd("*", AuthorConstants.MAX_AUTHOR_NAME_LENGTH + 1,
'*');
String longNick = getRandomString(MAX_AUTHOR_NAME_LENGTH + 1);
nicknameEntry.setText(longNick);
// Nickname should be too long
assertEquals(nicknameEntryWrapper.getError(),
......
......@@ -2,8 +2,6 @@ apply plugin: 'java'
sourceCompatibility = 1.6
targetCompatibility = 1.6
apply plugin: 'witness'
dependencies {
compile project(path: ':bramble-api', configuration: 'default')
}
plugins {
id 'java'
id 'net.ltgt.apt' version '0.9'
id 'idea'
}
apply plugin: 'java'
sourceCompatibility = 1.6
targetCompatibility = 1.6
apply plugin: 'net.ltgt.apt'
apply plugin: 'idea'
apply plugin: 'witness'
dependencies {
......@@ -16,10 +13,14 @@ dependencies {
compile 'com.squareup.okhttp3:okhttp:3.8.0'
compile 'org.jsoup:jsoup:1.10.3'
apt 'com.google.dagger:dagger-compiler:2.0.2'
testCompile project(path: ':bramble-core', configuration: 'default')
testCompile project(path: ':bramble-core', configuration: 'testOutput')
testCompile project(path: ':bramble-api', configuration: 'testOutput')
testCompile 'net.jodah:concurrentunit:0.4.2'
testApt 'com.google.dagger:dagger-compiler:2.0.2'
}
dependencyVerification {
......
......@@ -11,11 +11,14 @@ buildscript {
repositories {
jcenter()
mavenLocal()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath 'net.ltgt.gradle:gradle-apt-plugin:0.9'
classpath 'de.undercouch:gradle-download-task:3.2.0'
classpath files('libs/gradle-witness.jar')
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment