Skip to content

Commit

Permalink
Update to SDK 27, gradle 3.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
leadrien committed Feb 20, 2018
1 parent 6e20385 commit e9c5f0a
Show file tree
Hide file tree
Showing 8 changed files with 101 additions and 59 deletions.
106 changes: 93 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@

# Created by https://www.gitignore.io/api/android
# Created by https://www.gitignore.io/api/androidstudio

### AndroidStudio ###
# Covers files to be ignored for android development using Android Studio.

### Android ###
# Built application files
*.apk
*.ap_
Expand All @@ -18,9 +20,13 @@ gen/
out/

# Gradle files
.gradle
.gradle/
build/

# Signing files
.signing/

# Local configuration file (sdk path, etc)
local.properties

Expand All @@ -30,23 +36,97 @@ proguard/
# Log Files
*.log

# Android Studio Navigation editor temp files
# Android Studio
/*/build/
/*/local.properties
/*/out
/*/*/build
/*/*/production
captures/
.navigation/
*.ipr
*~
*.swp

# Android Studio captures folder
captures/
# Android Patch
gen-external-apklibs

# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild

# NDK
obj/

# Intellij
# IntelliJ IDEA
*.iml
*.iws
/out/

# User-specific configurations
.idea/libraries/
.idea/workspace.xml
.idea/tasks.xml
.idea/libraries
.idea/.name
.idea/compiler.xml
.idea/copyright/profiles_settings.xml
.idea/encodings.xml
.idea/misc.xml
.idea/modules.xml
.idea/scopes/scope_settings.xml
.idea/dictionaries
.idea/vcs.xml
.idea/jsLibraryMappings.xml
.idea/datasources.xml
.idea/dataSources.ids
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml

# Keystore files
*.jks
# OS-specific files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
# Legacy Eclipse project files
.classpath
.project
.cproject
.settings/

### Android Patch ###
gen-external-apklibs
# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.war
*.ear

# virtual machine crash logs (Reference: http://www.java.com/en/download/help/error_hotspot.xml)
hs_err_pid*

## Plugin-specific files:

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Mongo Explorer plugin
.idea/mongoSettings.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

### AndroidStudio Patch ###

!/gradle/wrapper/gradle-wrapper.jar


# End of https://www.gitignore.io/api/androidstudio
33 changes: 0 additions & 33 deletions .idea/misc.xml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Usage

Here is how to use this project to run native OpenCV code.

* Make sure you have Android SDK up to date, with NDK installed
* Make sure you have Android SDK up to date, with NDK installed and CMake
* Download latest OpenCV SDK for Android from OpenCV.org and decompress the zip file.
* Clone this project
* Create a symlink named `jniLibs` in `app/src/main` that points to `YOUR_OPENCV_SDK/sdk/native/libs`
Expand Down
2 changes: 1 addition & 1 deletion app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
cmake_minimum_required(VERSION 3.4.1)

# OpenCV stuff
include_directories(/opt/opencv-android-sdk-v3.0/sdk/native/jni/include)
include_directories(/opt/opencv-android-sdk/sdk/native/jni/include)
add_library( lib_opencv SHARED IMPORTED )
set_target_properties(lib_opencv PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/src/main/jniLibs/${ANDROID_ABI}/libopencv_java3.so)

Expand Down
10 changes: 3 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 26
compileSdkVersion 27
defaultConfig {
applicationId "ch.hepia.iti.opencvnativeandroidstudio"
minSdkVersion 19
targetSdkVersion 26
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Expand Down Expand Up @@ -36,10 +36,6 @@ android {

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26.1.0'
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:27.0.2'
compile project(':openCVLibrary300')
}
1 change: 0 additions & 1 deletion app/src/main/jniLibs

This file was deleted.

2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
classpath 'com.android.tools.build:gradle:3.0.1'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
4 changes: 2 additions & 2 deletions openCVLibrary300/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 26
compileSdkVersion 27

defaultConfig {
minSdkVersion 19
targetSdkVersion 26
targetSdkVersion 27
}

buildTypes {
Expand Down

0 comments on commit e9c5f0a

Please sign in to comment.