-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(java): add api compat check (#1335)
- Loading branch information
Showing
5 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.0.17 | ||
0.0.18 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,3 +30,4 @@ dist | |
|
||
generators/bin | ||
|
||
**/java/bin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// This package is to check the public API (binary) compatibility of the latest | ||
// published release with `algoliasearch-client-java` package. | ||
|
||
import me.champeau.gradle.japicmp.JapicmpTask | ||
|
||
plugins { | ||
id 'java-library' | ||
id 'me.champeau.gradle.japicmp' version '0.4.1' | ||
} | ||
|
||
repositories { | ||
maven { url = "https://oss.sonatype.org/content/repositories/snapshots/" } | ||
mavenCentral() | ||
} | ||
|
||
def baselineConfig = configurations.register('baseline') | ||
def latestConfig = configurations.register('latest') | ||
|
||
dependencies { | ||
baseline('com.algolia:algoliasearch-client-java:4.+') { | ||
transitive = false | ||
} | ||
latest(projects.algoliasearchCore) | ||
} | ||
|
||
def japicmp = tasks.register('japicmp', JapicmpTask) { | ||
dependsOn tasks.findByName("jar") | ||
oldClasspath.setFrom(baselineConfig) | ||
newClasspath.setFrom(latestConfig) | ||
onlyBinaryIncompatibleModified.set(true) | ||
failOnModification.set(true) | ||
txtOutputFile.set(file("$buildDir/reports/japi.txt")) | ||
ignoreMissingClasses.set(true) | ||
includeSynthetic.set(true) | ||
} | ||
|
||
tasks.findByName('check').configure { | ||
dependsOn japicmp | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
rootProject.name = "algoliasearch-client-java" | ||
|
||
include(":algoliasearch-core") | ||
include(":api") | ||
|
||
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") |