diff --git a/CHANGELOG.rst b/CHANGELOG.rst new file mode 100644 index 0000000..6722458 --- /dev/null +++ b/CHANGELOG.rst @@ -0,0 +1,18 @@ +============= + CHANGELOG +============= + + + +2018-10-20 +---------- +* moved to the latest build tools: + + - cmake 4.x + - gradle 4.x + - android tools 29 ?? + + +2017-04-06 +---------- +* initial porting of wolfssl to the new cmake diff --git a/app/src/main/cpp/CMakeLists.txt b/app/src/main/cpp/CMakeLists.txt index 70e5799..49cd9a6 100644 --- a/app/src/main/cpp/CMakeLists.txt +++ b/app/src/main/cpp/CMakeLists.txt @@ -1,25 +1,5 @@ - -# -# Copyright (C) The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - cmake_minimum_required(VERSION 3.4.1) -# configure import libs -# set(distribution_DIR ${CMAKE_SOURCE_DIR}/../../../../distribution) - add_library(lib_gmath STATIC IMPORTED) set_target_properties(lib_gmath PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/gmath/lib/${ANDROID_ABI}/libgmath.a) diff --git a/docs/gradle b/docs/gradle new file mode 100644 index 0000000..efc99b3 --- /dev/null +++ b/docs/gradle @@ -0,0 +1,73 @@ +[[[ Gradle ]]] + + +[[ gradle command line switches ]] + +# create a default gradle build +$ gradle init + +# show that tasks available +$ gradle tasks + +# clean the tests build, run the tests +$ gradle cleanTest test + +# ignore any task optimization +$ gradle test --rerun-tasks + + + +[[ Gradle Java ]] +https://docs.gradle.org/current/userguide/tutorial_java_projects.html + +[ publish jar ] + + + + + +[[ Install Multiple Gradle Binaries (brew) ]] + +[ Install multiple versions ] +brew versions gradle +git clone https://github.com/Homebrew/homebrew.git +git checkout 0123456 Library/Formula/gradle.rb +brew unlink gradle +Install diff version +brew install ~/scripts/myNewGradeScript.rb + --or-- +brew install Library/Formula/gradle.rb +brew switch gradle 1.9 +brew switch gradle 1.10 + + + +[[ Gradle Preehond Dev Notes ]] + +MODERN +Source: http://blog.paralleluniverse.co/2014/05/01/modern-java/ + + +task deployJar(type: Jar, dependsOn: jar) { + baseName = project.name + '-deploy' + deps = configurations.runtime + configurations.runtime.allArtifacts.files + depClasses = { deps.collect { it.isDirectory() ? it : zipTree(it) } } + from(depClasses) { + exclude 'META-INF/MANIFEST.MF' + } + manifest { + attributes 'Main-Class': 'com.example.redphone.Main' + } +} + + +* What went wrong: +A problem was found with the configuration of task ':startScripts'. +> No value has been specified for property 'mainClassName'. + +myMain = 'com.example.redphone.Main' + +startScripts { + mainClassName = myMain +} + diff --git a/docs/gradle_logs b/docs/gradle_logs new file mode 100644 index 0000000..f10db15 --- /dev/null +++ b/docs/gradle_logs @@ -0,0 +1,47 @@ +[[[ Building Notes ]]] + + + + +[[ gradle download dependencies ]] + +[j3g@J3G-MBPt:nc-wc-ndk] gradle tasks +Starting a Gradle Daemon (subsequent builds will be faster) + +> Configure project :wolfssl +File /Users/j3g/.android/repositories.cfg could not be loaded. +Checking the license for package Android SDK Build-Tools 25.0.2 in /usr/local/opt/android-sdk/licenses +License for package Android SDK Build-Tools 25.0.2 accepted. +Preparing "Install Android SDK Build-Tools 25.0.2 (revision: 25.0.2)". +"Install Android SDK Build-Tools 25.0.2 (revision: 25.0.2)" ready. +Finishing "Install Android SDK Build-Tools 25.0.2 (revision: 25.0.2)" +Installing Android SDK Build-Tools 25.0.2 in /usr/local/opt/android-sdk/build-tools/25.0.2 +"Install Android SDK Build-Tools 25.0.2 (revision: 25.0.2)" complete. +"Install Android SDK Build-Tools 25.0.2 (revision: 25.0.2)" finished. +Checking the license for package CMake 3.6.4111459 in /usr/local/opt/android-sdk/licenses +License for package CMake 3.6.4111459 accepted. +Preparing "Install CMake 3.6.4111459 (revision: 3.6.4111459)". +"Install CMake 3.6.4111459 (revision: 3.6.4111459)" ready. +Finishing "Install CMake 3.6.4111459 (revision: 3.6.4111459)" +Installing CMake 3.6.4111459 in /usr/local/opt/android-sdk/cmake/3.6.4111459 +"Install CMake 3.6.4111459 (revision: 3.6.4111459)" complete. +"Install CMake 3.6.4111459 (revision: 3.6.4111459)" finished. + +FAILURE: Build failed with an exception. + +* What went wrong: +A problem occurred configuring project ':wolfssl'. +> No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android + +* Try: +Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. + +* Get more help at https://help.gradle.org + +Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0. +Use '--warning-mode all' to show the individual deprecation warnings. +See https://docs.gradle.org/4.10.2/userguide/command_line_interface.html#sec:command_line_warnings + +BUILD FAILED in 48s + + diff --git a/docs/proj_agile b/docs/proj_agile new file mode 100644 index 0000000..37e217d --- /dev/null +++ b/docs/proj_agile @@ -0,0 +1,35 @@ +[[[ Agile ]]] + + +[[ Working ]] + +[ Tasks ] +* l@@k at Android Weekly emails +* + + +[ Milestone ] +* WolfCrypt compile +* + + + + + +[[ Backlog ]] + +[ Milestone ] +* JNI wrapper tests + -RSA Public Key Generation + -AES crypt + +[ Tasks ] + + + + +[[ Completed ]] + + + + diff --git a/docs/proj_nc b/docs/proj_nc new file mode 100644 index 0000000..68023d7 --- /dev/null +++ b/docs/proj_nc @@ -0,0 +1,13 @@ +[[[ Project Notes ]]] + + +The project includes the following build targets: +* app (default main source code) + -JNI, java connections to the native binaries + -C files + +* wolfcrypt + -test code, just a shell of .c code and the make files + +* wolfssl + - diff --git a/settings.gradle b/settings.gradle index 9ce13be..210049f 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,2 +1,3 @@ -//include ':app' -include ':wolfssl' +include ':app' +//includ ':wolfcrypt' +//include ':wolfssl' diff --git a/wolfcrypt/src/main/cpp/CMakeLists.txt b/wolfcrypt/src/main/cpp/CMakeLists.txt index 7d6028f..63881e5 100644 --- a/wolfcrypt/src/main/cpp/CMakeLists.txt +++ b/wolfcrypt/src/main/cpp/CMakeLists.txt @@ -1,23 +1,3 @@ - -# -# Copyright (C) The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# Generate one static lib and one shared lib, copy them into -# ${project_dir}/distribution for other indepdendent applications -# to use. cmake_minimum_required(VERSION 3.4.1) set(CMAKE_VERBOSE_MAKEFILE on) diff --git a/wolfcrypt/src/main/cpp/gmath/CMakeLists.txt b/wolfcrypt/src/main/cpp/gmath/CMakeLists.txt index 3de63af..a044171 100644 --- a/wolfcrypt/src/main/cpp/gmath/CMakeLists.txt +++ b/wolfcrypt/src/main/cpp/gmath/CMakeLists.txt @@ -1,23 +1,3 @@ -# -# Copyright (C) 2016 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# Build a static lib and copy it into distribution place for independent app to use -# we could not delete the bin directory is because android studio would error out -# when it checks target's existance. Only distribution place is used as import to app - cmake_minimum_required(VERSION 3.4.1) set(CMAKE_VERBOSE_MAKEFILE on) diff --git a/wolfcrypt/src/main/cpp/gperf/CMakeLists.txt b/wolfcrypt/src/main/cpp/gperf/CMakeLists.txt index 427e99b..f3b1974 100644 --- a/wolfcrypt/src/main/cpp/gperf/CMakeLists.txt +++ b/wolfcrypt/src/main/cpp/gperf/CMakeLists.txt @@ -1,23 +1,3 @@ -# -# Copyright (C) 2016 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# Build one shared lib. When we build, we set the bin to $user/tmp, and -# remove it after build complete, so only the distribution place could be -# used for application linking. - cmake_minimum_required(VERSION 3.4.1) set(CMAKE_VERBOSE_MAKEFILE on) diff --git a/wolfcrypt/src/main/res/values/strings.xml b/wolfcrypt/src/main/res/values/strings.xml index a763d34..de20b15 100644 --- a/wolfcrypt/src/main/res/values/strings.xml +++ b/wolfcrypt/src/main/res/values/strings.xml @@ -1,3 +1,3 @@ - BuildLibs + J3G BuildLibs diff --git a/wolfssl/build.gradle b/wolfssl/build.gradle index c5f79ed..07e0310 100644 --- a/wolfssl/build.gradle +++ b/wolfssl/build.gradle @@ -29,6 +29,8 @@ android { } } + + // buildTypes { // release { // minifyEnabled false