Skip to content

Commit

Permalink
add macOS support for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus committed Feb 27, 2018
1 parent 4b565b1 commit 05b3ab9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -21,6 +21,7 @@ local.properties
# Native libs
objectbox*.dll
libobjectbox*.so
libobjectbox*.dylib

### Test DB files
data.mdb
Expand Down
4 changes: 3 additions & 1 deletion build.gradle
Expand Up @@ -5,8 +5,10 @@ buildscript {
ext.ob_expected_version = project.hasProperty('expectedVersion') ? project.property('expectedVersion') : 'UNDEFINED'
ext {
isLinux = System.getProperty("os.name").contains("Linux")
isMac = !isLinux && System.getProperty("os.name").toLowerCase().contains("mac")
is64 = System.getProperty("sun.arch.data.model") == "64"
isLinux64 = isLinux && is64
isMac64 = isMac && is64
}

repositories {
Expand Down Expand Up @@ -156,6 +158,6 @@ task verifyVersion {

task wrapper(type: Wrapper) {
group 'build setup'
gradleVersion = '4.4.1'
gradleVersion = '4.5.1'
distributionType = Wrapper.DistributionType.ALL
}
2 changes: 2 additions & 0 deletions tests/objectbox-java-test/build.gradle
Expand Up @@ -11,6 +11,8 @@ dependencies {

if(isLinux64) {
compile "io.objectbox:objectbox-linux:${rootProject.version}"
} else if(isMac64) {
compile "io.objectbox:objectbox-macos:${rootProject.version}"
}

// Right now, test sources are in src/main not src/test
Expand Down
2 changes: 2 additions & 0 deletions tests/test-proguard/build.gradle
Expand Up @@ -11,6 +11,8 @@ dependencies {

if(isLinux64) {
compile "io.objectbox:objectbox-linux:${rootProject.version}"
} else if(isMac64) {
compile "io.objectbox:objectbox-macos:${rootProject.version}"
}

testCompile 'junit:junit:4.12'
Expand Down

0 comments on commit 05b3ab9

Please sign in to comment.