Compare commits

..

13 Commits

Author SHA1 Message Date
b8768ae9fe Helper library 0.9.1 2016-11-20 05:50:53 +00:00
54dc2c88bf Make it easier to test helper library against debug I2P Android builds 2016-11-20 05:50:35 +00:00
dba01b8c18 Remove debugging lines 2016-11-20 00:18:34 +00:00
b7b3eb7019 Refactor libraries:
- Remove client library dependency on helper library
- Separate client and helper library versions             
- Bump client library version to track I2P library version
2016-11-20 00:00:03 +00:00
430e2ab826 Remove kytv's IRC server from default tunnel list 2016-11-12 19:27:39 +00:00
87383a2ec8 Upgrade Espresso to 2.2.2, update tests 2016-11-12 19:19:38 +00:00
f63bfe1dea Bump build tools to 25.0.0 2016-11-08 06:45:08 +00:00
ff2021c0aa Upgrade Android support libraries to 25.0.0 2016-11-08 06:20:05 +00:00
51f7e07080 Remove unnecessary dependency from client library 2016-11-08 06:02:07 +00:00
7797e067a5 Upgrade I2P dependencies to 0.9.27
The router JAR is now fetched instead of built locally
2016-11-08 05:52:40 +00:00
cf09a21f1e Upgrade Android Gradle plugin 2016-11-08 05:51:40 +00:00
914294927d Updated CHANGELOG 2016-06-13 13:12:50 +00:00
bd0455c413 0.9.26 2016-06-13 13:12:28 +00:00
16 changed files with 56 additions and 75 deletions

View File

@ -1,6 +1,7 @@
0.9.26
0.9.26 / 2016-06-13 / b003272c8b504bb0d904edca2e95359a57c9a52c
* Fixed "I2CP already listening" bug
* Fixed crash when adding tunnel to empty list
* Translation updates
0.9.25 / 2016-04-17 / 46d45a878a2b73394b26ca27dbe6c696dedcf1c3
* Fixed a bug on Samsung Android 4.2 devices

View File

@ -5,8 +5,8 @@ android {
compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION as String)
buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION as String
defaultConfig {
versionCode 4745232
versionName '0.9.25'
versionCode 4745233
versionName '0.9.26'
minSdkVersion 9
targetSdkVersion Integer.parseInt(project.ANDROID_BUILD_TARGET_SDK_VERSION as String)
@ -53,10 +53,11 @@ android {
dependencies {
// Local dependencies
compile project(':lib:client')
compile project(':lib:helper')
compile project(':routerjars')
// Android Support Repository dependencies
def supportVersion = '23.4.0'
def supportVersion = '25.0.0'
compile "com.android.support:support-v4:$supportVersion"
compile "com.android.support:appcompat-v7:$supportVersion"
compile "com.android.support:preference-v7:$supportVersion"
@ -70,21 +71,21 @@ dependencies {
exclude group: 'com.android.support', module: 'support-v4'
}
compile 'com.pnikosis:materialish-progress:1.7'
compile 'net.i2p:router:0.9.27'
compile 'net.i2p.android.ext:floatingactionbutton:1.10.1'
compile 'org.sufficientlysecure:html-textview:1.6'
// Testing-only dependencies
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.0'
androidTestCompile 'com.android.support.test:testing-support-lib:0.1'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
}
dependencyVerification {
verify = [
'com.android.support:support-v4:a0d002465c0f611eedaaef2b2530707d2e9fb3a5c7ed66f53c556a12f714f43a',
'com.android.support:appcompat-v7:d3d96637b0e8e61046567b8c87b667dcf3cd31c7447f651cb58d6e6e744adfba',
'com.android.support:preference-v7:b834787ee64db6c7c53ed7490537eeef52245b7862d4069c06e12b24b77ebbc4',
'com.android.support:preference-v14:21c55edf74928a96fa816e32c0c4d0c98e2280002e84d2b10b458b4a36be9615',
'com.android.support:recyclerview-v7:24465b2ba90dc5ed7e2c05f1c87fe4256c27df6d3cd69b6177f3cb447b05c021',
'com.android.support:support-v4:c25c657954152c4315584572f5008a6780b086169519f67acd20c2617b9da325',
'com.android.support:appcompat-v7:bc0b13b1ba63ed226ae509044c880fdfe225cb86d21924ef19f2fb97a71c877e',
'com.android.support:preference-v7:a3ebe066ad04787dd377562abb391255b89d056f8dc450365a504f14d74c825c',
'com.android.support:preference-v14:6a374214736eff84637b847ba0015d43c52edef6d320b9f6920ead580c8dbe05',
'com.android.support:recyclerview-v7:fc6d6a9b802ed3a26789812f29167135cac7b4d956f4deda54fc1f317721da64',
'com.androidplot:androidplot-core:e44d9e59e06f025330831f7d3c987d2778a3302025184cf0cef05714b5171212',
'com.eowise:recyclerview-stickyheaders:7b236da49b33b840e9ba6e7e4182218d1a2d9047236fdbc3ca947352f9b0883b',
'com.mcxiaoke.viewpagerindicator:library:1e8aad664137f68abdfee94889f6da3dc98be652a235176a403965a07a25de62',

View File

@ -16,6 +16,7 @@ import static android.support.test.espresso.matcher.ViewMatchers.hasSibling;
import static android.support.test.espresso.matcher.ViewMatchers.isDescendantOfA;
import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static android.support.test.espresso.matcher.ViewMatchers.withParent;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
import static org.hamcrest.Matchers.allOf;
import static org.hamcrest.Matchers.not;
@ -57,13 +58,13 @@ public class I2PActivityTest extends ActivityInstrumentationTestCase2<I2PActivit
public void testMainSwipe() {
onView(withId(R.id.router_onoff_button)).check(matches(isDisplayed()));
onView(allOf(withId(R.id.pager), hasSibling(withId(R.id.main_toolbar)))).perform(swipeLeft());
onView(allOf(withId(R.id.pager), withParent(hasSibling(withId(R.id.main_toolbar))))).perform(swipeLeft());
onView(withId(R.id.router_onoff_button)).check(matches(not(isDisplayed())));
onView(withText(R.string.label_i2ptunnel_client)).check(matches(isDisplayed()));
onView(allOf(withId(R.id.pager), hasSibling(withId(R.id.main_toolbar)))).perform(swipeLeft());
onView(allOf(withId(R.id.pager), withParent(hasSibling(withId(R.id.main_toolbar))))).perform(swipeLeft());
// TODO: test tunnels ViewPager
onView(allOf(withId(R.id.pager), hasSibling(withId(R.id.main_toolbar)))).perform(swipeLeft());
onView(allOf(withId(R.id.pager), withParent(hasSibling(withId(R.id.main_toolbar))))).perform(swipeLeft());
onView(withText(R.string.label_i2ptunnel_client)).check(matches(not(isDisplayed())));
onView(withText(R.string.label_router)).check(matches(isDisplayed()));
// TODO: test addressbook ViewPager

View File

@ -208,7 +208,7 @@ public class TunnelDetailFragment extends Fragment {
}
}
})
.setNegativeButton(net.i2p.android.lib.client.R.string.no, new DialogInterface.OnClickListener() {
.setNegativeButton(R.string.no, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialogInterface, int i) {
}
});

View File

@ -124,29 +124,4 @@ tunnel.4.option.inbound.lengthVariance=0
tunnel.4.option.outbound.length=2
tunnel.4.option.outbound.lengthVariance=0
tunnel.4.option.outbound.priority=15
tunnel.4.startOnLoad=true
# irc irc.killyourtv.i2p
tunnel.5.name=KYTV IRC
tunnel.5.description=IRC tunnel to KillYourTV's network
tunnel.5.type=ircclient
tunnel.5.sharedClient=true
tunnel.5.interface=127.0.0.1
tunnel.5.listenPort=6670
tunnel.5.targetDestination=irc.killyourtv.i2p
tunnel.5.i2cpHost=127.0.0.1
tunnel.5.i2cpPort=7654
tunnel.5.option.inbound.nickname=shared clients
tunnel.5.option.outbound.nickname=shared clients
tunnel.5.option.i2cp.delayOpen=true
tunnel.5.option.i2cp.reduceIdleTime=600000
tunnel.5.option.i2cp.reduceOnIdle=true
tunnel.5.option.i2cp.reduceQuantity=1
tunnel.5.option.i2p.streaming.connectDelay=1000
tunnel.5.option.i2p.streaming.maxWindowSize=16
tunnel.5.option.inbound.length=2
tunnel.5.option.inbound.lengthVariance=0
tunnel.5.option.outbound.length=2
tunnel.5.option.outbound.lengthVariance=0
tunnel.5.option.outbound.priority=15
tunnel.5.startOnLoad=true
tunnel.4.startOnLoad=true

View File

@ -3,16 +3,19 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
classpath 'com.android.tools.build:gradle:2.2.2'
classpath files('gradle/libs/gradle-witness.jar')
}
}
allprojects {
version = VERSION_NAME
group = GROUP
repositories {
jcenter()
}
}
configure(project(':lib').subprojects) {
version = VERSION_NAME
}

View File

@ -1,4 +1,3 @@
VERSION_NAME=0.9
GROUP=net.i2p.android
POM_URL=https://github.com/i2p/i2p.android.base
@ -13,5 +12,5 @@ POM_DEVELOPER_NAME=str4d
POM_DEVELOPER_EMAIL=str4d@i2pmail.org
ANDROID_BUILD_TARGET_SDK_VERSION=22
ANDROID_BUILD_TOOLS_VERSION=23.0.1
ANDROID_BUILD_SDK_VERSION=23
ANDROID_BUILD_TOOLS_VERSION=25.0.0
ANDROID_BUILD_SDK_VERSION=25

View File

@ -1,6 +1,6 @@
#Mon May 02 16:55:47 NZST 2016
#Sun Nov 06 10:33:19 CST 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.12-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip

View File

@ -25,11 +25,8 @@ android {
}
dependencies {
compile 'net.i2p:i2p:0.9.26'
compile 'net.i2p.client:streaming:0.9.26'
// No direct dependencies on the helper lib, but this ensures consistent library behavior
compile project(':lib:helper')
compile 'com.android.support:support-v4:23.4.0'
compile "net.i2p:i2p:$VERSION_NAME"
compile "net.i2p.client:streaming:$VERSION_NAME"
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.9.5'
@ -37,10 +34,9 @@ dependencies {
dependencyVerification {
verify = [
'com.android.support:support-v4:a0d002465c0f611eedaaef2b2530707d2e9fb3a5c7ed66f53c556a12f714f43a',
'net.i2p:i2p:5e0f5efa8849e2abe72efaf1530bdf4a090717d49acfdfbe92911a14d4b4e511',
'net.i2p.client:mstreaming:1f343a640f79707f6652bbf344f65b42215ae3f7a221a3ee8ddd70ff59e812ae',
'net.i2p.client:streaming:5add7390de089f3c3c4f4005f0daa83014418416e890ed6c475e15cef51ba3c7',
'net.i2p:i2p:efd4afaaff278951ff42cfa20ec1862d7981ac44b376ddf50c7edf713e33a730',
'net.i2p.client:mstreaming:1b698890faf6b5237b8c6df94abf02945720d065f2c717ab5ba5b9f94b0b62fe',
'net.i2p.client:streaming:af1b8cf3bb215c1116c0f8d8d019edf021f258805a4035ddc45b996a8abd892d',
]
}

View File

@ -1,3 +1,5 @@
VERSION_NAME=0.9.27
POM_NAME=I2P Android client library
POM_DESCRIPTION=A client library enabling Android developers to add native I2P support to their apps.
POM_ARTIFACT_ID=client

View File

@ -73,9 +73,7 @@ class DomainServerSocket extends ServerSocket {
*/
@Override
public void close() throws IOException {
mDomainSocketFactory._log.debug("Closing DomainServerSocket");
mLocalServerSocket.close();
mDomainSocketFactory._log.debug("DomainServerSocket closed");
mClosed = true;
}

View File

@ -25,7 +25,7 @@ android {
}
dependencies {
compile 'com.android.support:support-v4:23.4.0'
compile 'com.android.support:support-v4:25.0.0'
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.9.5'
@ -33,7 +33,7 @@ dependencies {
dependencyVerification {
verify = [
'com.android.support:support-v4:a0d002465c0f611eedaaef2b2530707d2e9fb3a5c7ed66f53c556a12f714f43a',
'com.android.support:support-v4:c25c657954152c4315584572f5008a6780b086169519f67acd20c2617b9da325',
]
}

View File

@ -1,3 +1,5 @@
VERSION_NAME=0.9.1
POM_NAME=I2P Android helper library
POM_DESCRIPTION=A helper library enabling Android developers to easily add I2P Android support to their apps.
POM_ARTIFACT_ID=helper

View File

@ -38,12 +38,22 @@ public class I2PAndroidHelper {
}
private final Context mContext;
private final boolean mUseDebug;
private boolean mTriedBindState;
private IRouterState mStateService;
private Callback mCallback;
public I2PAndroidHelper(Context context) {
mContext = context;
mUseDebug = false;
}
/**
* @param useDebug Enable usage against debug builds of I2P Android.
*/
public I2PAndroidHelper(Context context, boolean useDebug) {
mContext = context;
mUseDebug = useDebug;
}
/**
@ -124,11 +134,12 @@ public class I2PAndroidHelper {
intent.setClassName(URI_I2P_ANDROID_DONATE, ROUTER_SERVICE_CLASS);
else if (isAppInstalled(URI_I2P_ANDROID_LEGACY))
intent.setClassName(URI_I2P_ANDROID_LEGACY, ROUTER_SERVICE_CLASS);
else if (isAppInstalled(URI_I2P_ANDROID_DEBUG)) {
else
intent = null;
if (mUseDebug && isAppInstalled(URI_I2P_ANDROID_DEBUG)) {
Log.w(LOG_TAG, "Using debug build of I2P Android");
intent.setClassName(URI_I2P_ANDROID_DEBUG, ROUTER_SERVICE_CLASS);
} else
intent = null;
}
return intent;
}
@ -166,7 +177,8 @@ public class I2PAndroidHelper {
* @return true if I2P Android is installed, false otherwise.
*/
public boolean isI2PAndroidInstalled() {
return isAppInstalled(URI_I2P_ANDROID) ||
return (mUseDebug && isAppInstalled(URI_I2P_ANDROID_DEBUG)) ||
isAppInstalled(URI_I2P_ANDROID) ||
isAppInstalled(URI_I2P_ANDROID_DONATE) ||
isAppInstalled(URI_I2P_ANDROID_LEGACY);
}

View File

@ -8,7 +8,6 @@ task buildRouter(type: Exec) {
// TODO an empty routerjars.jar is added to the classpath
artifacts {
'default' file: file('libs/router.jar'), builtBy: buildRouter
'default' file: file('libs/newsxml.jar'), builtBy: buildRouter
'default' file: file('libs/i2ptunnel.jar'), builtBy: buildRouter
'default' file: file('libs/i2ptunnel-ui.jar'), builtBy: buildRouter

View File

@ -17,16 +17,11 @@
<echo message="Using I2P source at ${i2pbase}" />
<property name="i2plib" location="${i2pbase}/build" />
<available property="have.router" file="${i2plib}/router.jar" />
<available property="have.bob" file="${i2plib}/BOB.jar" />
<available property="have.newsxml" file="${i2pbase}/apps/routerconsole/java/build/newsxml.jar" />
<available property="have.i2ptunnel" file="${i2plib}/i2ptunnel-ui.jar" />
<available property="have.addressbook" file="${i2plib}/addressbook.jar" />
<target name="buildRouter" unless="have.router">
<ant dir="${i2pbase}" inheritall="false" useNativeBasedir="true" target="buildRouter" />
</target>
<target name="buildNewsXMLJar" unless="have.newsxml">
<ant dir="${i2pbase}" inheritall="false" useNativeBasedir="true" target="buildNewsXMLJar" />
</target>
@ -41,12 +36,9 @@
<ant dir="${i2pbase}" inheritall="false" useNativeBasedir="true" target="buildBOB" />
</target>
<target name="buildrouter" depends="buildRouter, buildNewsXMLJar, buildI2PTunnelJar, buildAddressbook, buildBOB">
<target name="buildrouter" depends="buildNewsXMLJar, buildI2PTunnelJar, buildAddressbook, buildBOB">
<mkdir dir="${jar.libs.dir}" />
<!-- router -->
<copy file="${i2plib}/router.jar" todir="${jar.libs.dir}" />
<!-- newsxml -->
<copy file="${i2pbase}/apps/routerconsole/java/build/newsxml.jar" todir="${jar.libs.dir}" />