Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix android sample build #4

Merged
merged 1 commit into from
Jan 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@
Gemfile.lock
*.gemspec
/android/WebsocketExampleClientProject/.idea/vcs.xml
/android/WebsocketExampleClientProject/.idea/scopes/scope_settings.xml
/android/WebsocketExampleClientProject/.idea/runConfigurations.xml
/android/WebsocketExampleClientProject/.idea/modules.xml
/android/WebsocketExampleClientProject/.idea/misc.xml
/android/WebsocketExampleClientProject/.idea/gradle.xml
/android/WebsocketExampleClientProject/.idea/encodings.xml
/android/WebsocketExampleClientProject/.idea/copyright/profiles_settings.xml
/android/WebsocketExampleClientProject/.idea/compiler.xml
/android/WebsocketExampleClientProject/.idea/caches
.idea
/.DS_Store
*.iml
23 changes: 0 additions & 23 deletions android/WebsocketExampleClientProject/.idea/compiler.xml

This file was deleted.

This file was deleted.

5 changes: 0 additions & 5 deletions android/WebsocketExampleClientProject/.idea/encodings.xml

This file was deleted.

19 changes: 0 additions & 19 deletions android/WebsocketExampleClientProject/.idea/gradle.xml

This file was deleted.

This file was deleted.

33 changes: 0 additions & 33 deletions android/WebsocketExampleClientProject/.idea/misc.xml

This file was deleted.

10 changes: 0 additions & 10 deletions android/WebsocketExampleClientProject/.idea/modules.xml

This file was deleted.

This file was deleted.

7 changes: 0 additions & 7 deletions android/WebsocketExampleClientProject/.idea/vcs.xml

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0'
classpath 'com.android.tools.build:gradle:3.2.1'

}
}
apply plugin: 'android'
apply plugin: 'com.android.application'

repositories {
google()
mavenCentral()
}

android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
buildToolsVersion '28.0.3'

defaultConfig {
minSdkVersion 16
Expand All @@ -23,6 +26,6 @@ android {
}

dependencies {
compile "org.java-websocket:Java-WebSocket:1.3.0"
compile(name: 'themis-0.9.4', ext: 'aar')
implementation "org.java-websocket:Java-WebSocket:1.3.0"
implementation (name: 'themis-0.9.4', ext: 'aar')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it makes sense to use latest themis 0.10.0

Copy link
Author

@sergeyzenchenko sergeyzenchenko Jan 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have aar file for Themis 0.10.0.
I think version update should be in a separate change because this one just fixing build issues with latest Gradle and Android Studio.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay :)

}
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,11 @@ public void onError(Exception e) {
}

public void sendMessage(View view) {
EditText editText = (EditText)findViewById(R.id.message);
EditText editText = findViewById(R.id.message);

try {
byte[] wrapped = secureSession.wrap(editText.getText().toString().getBytes("UTF-8"));
byte[] message = editText.getText().toString().getBytes("UTF-8");
byte[] wrapped = secureSession.wrap(message);
mWebSocketClient.send(Base64.encodeToString(wrapped, Base64.DEFAULT));
} catch (SecureSessionException e) {
e.printStackTrace();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
1 change: 1 addition & 0 deletions android/WebsocketExampleClientProject/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

allprojects {
repositories {
google()
jcenter()
flatDir {
dirs 'libs'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip