Skip to content
This repository has been archived by the owner on Mar 17, 2022. It is now read-only.

Commit

Permalink
Update gradle call to ndk-build
Browse files Browse the repository at this point in the history
  • Loading branch information
rmtheis committed Jan 30, 2016
1 parent bdf1429 commit 918f7f1
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 4 deletions.
26 changes: 26 additions & 0 deletions eyes-two/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2009 Google Inc.
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.
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.googlecode.eyesfree.ocr"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="8" />

</manifest>
6 changes: 4 additions & 2 deletions eyes-two/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ android {
// Call external ndk-build(.cmd) script to build the native code
task ndkBuild(type: Exec) {
def ndkBuildExt = Os.isFamily(Os.FAMILY_WINDOWS) ? ".cmd" : ""
commandLine "ndk-build${ndkBuildExt}", '-C', file('src/main').absolutePath,
commandLine "${android.ndkDirectory}/ndk-build${ndkBuildExt}",
'-C', file('src/main').absolutePath,
'-j', Runtime.runtime.availableProcessors()
}

Expand All @@ -41,7 +42,8 @@ android {
// Cleanup task to remove previously generated binaries
task ndkClean(type: Exec) {
def ndkBuildExt = Os.isFamily(Os.FAMILY_WINDOWS) ? ".cmd" : ""
commandLine "ndk-build${ndkBuildExt}", '-C', file('src/main').absolutePath, 'clean'
commandLine "${android.ndkDirectory}/ndk-build${ndkBuildExt}",
'-C', file('src/main').absolutePath, 'clean'
}

tasks.withType(Delete) {
Expand Down
6 changes: 4 additions & 2 deletions tess-two/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ android {
// Call external ndk-build(.cmd) script to build the native code
task ndkBuild(type: Exec) {
def ndkBuildExt = Os.isFamily(Os.FAMILY_WINDOWS) ? ".cmd" : ""
commandLine "ndk-build${ndkBuildExt}", '-C', file('.').absolutePath,
commandLine "${android.ndkDirectory}/ndk-build${ndkBuildExt}",
'-C', file('.').absolutePath,
'-j', Runtime.runtime.availableProcessors()
}

Expand All @@ -46,7 +47,8 @@ android {
// Cleanup task to remove previously generated binaries
task ndkClean(type: Exec) {
def ndkBuildExt = Os.isFamily(Os.FAMILY_WINDOWS) ? ".cmd" : ""
commandLine "ndk-build${ndkBuildExt}", '-C', file('.').absolutePath, 'clean'
commandLine "${android.ndkDirectory}/ndk-build${ndkBuildExt}",
'-C', file('.').absolutePath, 'clean'
}

tasks.withType(Delete) {
Expand Down

0 comments on commit 918f7f1

Please sign in to comment.