NEW: starting the process of fixing this build with the latest NDK tools
This commit is contained in:
parent
d1218f34d2
commit
aeb06b2123
|
@ -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
|
|
@ -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)
|
cmake_minimum_required(VERSION 3.4.1)
|
||||||
|
|
||||||
# configure import libs
|
|
||||||
# set(distribution_DIR ${CMAKE_SOURCE_DIR}/../../../../distribution)
|
|
||||||
|
|
||||||
add_library(lib_gmath STATIC IMPORTED)
|
add_library(lib_gmath STATIC IMPORTED)
|
||||||
set_target_properties(lib_gmath PROPERTIES IMPORTED_LOCATION
|
set_target_properties(lib_gmath PROPERTIES IMPORTED_LOCATION
|
||||||
${distribution_DIR}/gmath/lib/${ANDROID_ABI}/libgmath.a)
|
${distribution_DIR}/gmath/lib/${ANDROID_ABI}/libgmath.a)
|
||||||
|
|
|
@ -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
|
||||||
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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 ]]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
-
|
|
@ -1,2 +1,3 @@
|
||||||
//include ':app'
|
include ':app'
|
||||||
include ':wolfssl'
|
//includ ':wolfcrypt'
|
||||||
|
//include ':wolfssl'
|
||||||
|
|
|
@ -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)
|
cmake_minimum_required(VERSION 3.4.1)
|
||||||
|
|
||||||
set(CMAKE_VERBOSE_MAKEFILE on)
|
set(CMAKE_VERBOSE_MAKEFILE on)
|
||||||
|
|
|
@ -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)
|
cmake_minimum_required(VERSION 3.4.1)
|
||||||
|
|
||||||
set(CMAKE_VERBOSE_MAKEFILE on)
|
set(CMAKE_VERBOSE_MAKEFILE on)
|
||||||
|
|
|
@ -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)
|
cmake_minimum_required(VERSION 3.4.1)
|
||||||
|
|
||||||
set(CMAKE_VERBOSE_MAKEFILE on)
|
set(CMAKE_VERBOSE_MAKEFILE on)
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">BuildLibs</string>
|
<string name="app_name">J3G BuildLibs</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -29,6 +29,8 @@ android {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// buildTypes {
|
// buildTypes {
|
||||||
// release {
|
// release {
|
||||||
// minifyEnabled false
|
// minifyEnabled false
|
||||||
|
|
Loading…
Reference in New Issue