WIP: moving files, adding a test activity

This commit is contained in:
JohnE 2019-02-19 13:42:57 -08:00
parent 1780a8942d
commit e0dca174be
25 changed files with 59 additions and 7 deletions

View File

@ -30,7 +30,7 @@ android {
sourceSets { sourceSets {
main { main {
// let gradle pack the shared library into apk // let gradle pack the shared library into apk
jniLibs.srcDirs = ['libs/wolfssl-jni'] jniLibs.srcDirs = ['lib/wolfssl-jni']
} }
} }
// externalNativeBuild { // externalNativeBuild {
@ -57,8 +57,9 @@ task copyLibs(type: Copy) {
} }
dependencies { dependencies {
// testImplementation 'junit:junit:4.12' implementation project(":wolfssl-jni")
implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.android.support:appcompat-v7:28.0.0'
// testImplementation 'junit:junit:4.12'
} }
// tasks.whenTaskAdded { task -> // tasks.whenTaskAdded { task ->

View File

@ -6,6 +6,9 @@ package io.malloc.ccc;
import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatActivity;
import android.os.Bundle; import android.os.Bundle;
import android.widget.TextView; import android.widget.TextView;
import com.wolfssl.wolfcrypt.Aes;
/* /*
* Simple Java UI to trigger jni function. It is exactly same as Java code * Simple Java UI to trigger jni function. It is exactly same as Java code
* in hello-jni. * in hello-jni.
@ -23,5 +26,6 @@ public class MainActivity extends AppCompatActivity {
static { static {
System.loadLibrary("wolfssl-jni"); System.loadLibrary("wolfssl-jni");
} }
} }

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.example.hellolibs.MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!" />
</RelativeLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -0,0 +1,6 @@
<resources>
<!-- Example customization of dimensions originally defined in res/values/dimens.xml
(such as screen margins) for screens with more than 820dp of available width. This
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
<dimen name="activity_horizontal_margin">64dp</dimen>
</resources>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
</resources>

View File

@ -0,0 +1,5 @@
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
</resources>

View File

@ -1,3 +1,3 @@
<resources> <resources>
<string name="app_name">Copius Cipher Chain</string> <string name="app_name">hello-libs</string>
</resources> </resources>

View File

@ -0,0 +1,11 @@
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
</resources>

View File

@ -1,3 +1,5 @@
include ':wolfssl-lib' // include this at the top, for shared libraries
include ':wolfssl-jni' include ':ccc-jni', ':wolfssl-jni'
// include ':wolfssl-lib'
// include ':wolfssl-jni'
include ':ccc-jni' include ':ccc-jni'

View File

@ -6,6 +6,7 @@ android {
buildToolsVersion '28.0.3' buildToolsVersion '28.0.3'
defaultConfig { defaultConfig {
// no applicationId with a library
// applicationId 'xyz.nc.android.wc' // applicationId 'xyz.nc.android.wc'
minSdkVersion 23 minSdkVersion 23
targetSdkVersion 28 targetSdkVersion 28
@ -45,5 +46,5 @@ task copyLibs(type: Copy) {
dependencies { dependencies {
testImplementation 'junit:junit:4.12' // testImplementation 'junit:junit:4.12'
} }