Skip to content

Commit 02fa97a

Browse files
Merge branch 'java-library-plugin' into 'dev'
Migrate to Java library plugin See merge request objectbox/objectbox-java!66
2 parents bb69a59 + daf47e8 commit 02fa97a

File tree

7 files changed

+29
-30
lines changed

7 files changed

+29
-30
lines changed

objectbox-java-api/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apply plugin: 'java'
1+
apply plugin: 'java-library'
22

33
sourceCompatibility = JavaVersion.VERSION_1_8
44
targetCompatibility = JavaVersion.VERSION_1_8

objectbox-java/build.gradle

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
apply plugin: 'java'
1+
apply plugin: 'java-library'
22
apply plugin: "com.github.spotbugs"
33

44
sourceCompatibility = JavaVersion.VERSION_1_8
55
targetCompatibility = JavaVersion.VERSION_1_8
66

77
dependencies {
8-
compile fileTree(include: ['*.jar'], dir: 'libs')
9-
compile project(':objectbox-java-api')
10-
compile 'org.greenrobot:essentials:3.0.0-RC1'
11-
compile 'com.google.flatbuffers:flatbuffers-java:1.12.0'
12-
compile 'com.google.code.findbugs:jsr305:3.0.2'
8+
api project(':objectbox-java-api')
9+
implementation 'org.greenrobot:essentials:3.0.0-RC1'
10+
implementation 'com.google.flatbuffers:flatbuffers-java:1.12.0'
11+
api 'com.google.code.findbugs:jsr305:3.0.2'
1312
}
1413

1514
spotbugs {

objectbox-kotlin/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ artifacts {
4848
}
4949

5050
dependencies {
51-
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
51+
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
5252

53-
compile project(':objectbox-java')
53+
api project(':objectbox-java')
5454
}
5555

5656

objectbox-rxjava/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
apply plugin: 'java'
1+
apply plugin: 'java-library'
22

33
sourceCompatibility = JavaVersion.VERSION_1_8
44
targetCompatibility = JavaVersion.VERSION_1_8
55

66
dependencies {
7-
compile project(':objectbox-java')
8-
compile 'io.reactivex.rxjava2:rxjava:2.2.18'
7+
api project(':objectbox-java')
8+
api 'io.reactivex.rxjava2:rxjava:2.2.18'
99

10-
testCompile "junit:junit:$junit_version"
11-
testCompile "org.mockito:mockito-core:$mockito_version"
10+
testImplementation "junit:junit:$junit_version"
11+
testImplementation "org.mockito:mockito-core:$mockito_version"
1212
}
1313

1414
task javadocJar(type: Jar, dependsOn: javadoc) {

objectbox-rxjava3/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ buildscript {
22
ext.javadocDir = "$buildDir/docs/javadoc"
33
}
44

5-
apply plugin: 'java'
5+
apply plugin: 'java-library'
66
apply plugin: 'kotlin'
77
apply plugin: 'org.jetbrains.dokka'
88

@@ -33,13 +33,13 @@ dokka {
3333
}
3434

3535
dependencies {
36-
compile project(':objectbox-java')
37-
compile 'io.reactivex.rxjava3:rxjava:3.0.1'
36+
api project(':objectbox-java')
37+
api 'io.reactivex.rxjava3:rxjava:3.0.1'
3838
compileOnly "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
3939

40-
testCompile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
41-
testCompile "junit:junit:$junit_version"
42-
testCompile "org.mockito:mockito-core:$mockito_version"
40+
testImplementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
41+
testImplementation "junit:junit:$junit_version"
42+
testImplementation "org.mockito:mockito-core:$mockito_version"
4343
}
4444

4545
task javadocJar(type: Jar, dependsOn: dokka) {

tests/objectbox-java-test/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apply plugin: 'java'
1+
apply plugin: 'java-library'
22

33
uploadArchives.enabled = false
44

@@ -22,18 +22,18 @@ repositories {
2222
}
2323

2424
dependencies {
25-
compile project(':objectbox-java')
26-
compile 'org.greenrobot:essentials:3.0.0-RC1'
25+
implementation project(':objectbox-java')
26+
implementation 'org.greenrobot:essentials:3.0.0-RC1'
2727

2828
// Check flag to use locally compiled version to avoid dependency cycles
2929
if (!project.hasProperty('noObjectBoxTestDepencies') || !noObjectBoxTestDepencies) {
3030
println "Using $ob_native_dep"
31-
compile ob_native_dep
31+
implementation ob_native_dep
3232
} else {
3333
println "Did NOT add native dependency"
3434
}
3535

36-
testCompile "junit:junit:$junit_version"
36+
testImplementation "junit:junit:$junit_version"
3737
}
3838

3939
test {

tests/test-proguard/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apply plugin: 'java'
1+
apply plugin: 'java-library'
22

33
uploadArchives.enabled = false
44

@@ -22,16 +22,16 @@ repositories {
2222
}
2323

2424
dependencies {
25-
compile project(':objectbox-java')
26-
compile project(':objectbox-java-api')
25+
implementation project(':objectbox-java')
26+
implementation project(':objectbox-java-api')
2727

2828
// Check flag to use locally compiled version to avoid dependency cycles
2929
if (!project.hasProperty('noObjectBoxTestDepencies') || !noObjectBoxTestDepencies) {
3030
println "Using $ob_native_dep"
31-
compile ob_native_dep
31+
implementation ob_native_dep
3232
} else {
3333
println "Did NOT add native dependency"
3434
}
3535

36-
testCompile "junit:junit:$junit_version"
36+
testImplementation "junit:junit:$junit_version"
3737
}

0 commit comments

Comments
 (0)