Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(gradle): multi-module release, split logic into ext/libraries/re…
…lease/standalone
- Loading branch information
Showing
10 changed files
with
143 additions
and
88 deletions.
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
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,52 @@ | ||
apply plugin: 'com.android.library' | ||
apply plugin: 'maven' | ||
apply plugin: 'maven-publish' | ||
apply plugin: "com.jfrog.bintray" | ||
|
||
android { | ||
compileSdkVersion 28 | ||
buildToolsVersion '28.0.3' | ||
|
||
defaultConfig { | ||
minSdkVersion 14 | ||
targetSdkVersion 28 | ||
versionCode 1 | ||
versionName VERSION | ||
consumerProguardFiles "proguard-rules.pro" | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
|
||
testOptions { | ||
unitTests { | ||
// Disable automatic throwing on system method calls. | ||
// Rationale: We don't want to mock system methods (for example JSONArray.length), | ||
// but rather ensure we use them correctly. | ||
returnDefaultValues = true | ||
|
||
// Required by Robolectric http://robolectric.org/getting-started/ | ||
includeAndroidResources = true | ||
|
||
all { | ||
testLogging { | ||
events "skipped", "failed", "standardOut", "standardError" | ||
exceptionFormat "full" | ||
outputs.upToDateWhen { false } | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation fileTree(dir: 'libs', include: ['*.jar']) | ||
|
||
testImplementation libraries.junit | ||
testImplementation libraries.robolectric | ||
testImplementation libraries.mockito | ||
} |
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
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,21 @@ | ||
/** | ||
* Extra properties applied by default to all modules. | ||
*/ | ||
ext { | ||
VERSION = '0.0.1-alpha10' | ||
GROUP = 'com.algolia' | ||
NAME = 'InstantSearch Android' | ||
DESC = "A library to build instant-search applications on Android." | ||
GITHUB = "algolia/instantsearch-android" | ||
WEBSITE = "https://github.com/" + GITHUB | ||
REPO = WEBSITE + ".git" | ||
LICENSE = 'MIT' | ||
LICENSE_URL = "http://www.opensource.org/licenses/mit-license.php" | ||
VERSION_DESC = 'Version ' + VERSION | ||
|
||
LABELS = ["android", "android-library", | ||
"algolia", "search", "instant-search", "search-interface", | ||
"faceted-search", "search-synonyms", "geo-search", "search-engine", | ||
"widgets", "custom-widgets", "interface-builder", | ||
"open-source"] | ||
} |
File renamed without changes.
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,4 +1,4 @@ | ||
/* | ||
/** | ||
* Libraries that can be used by any submodule. | ||
* */ | ||
ext { | ||
|
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/** Apply from this file when developing IS to include it as local module in another project. | ||
* | ||
* Steps: | ||
* 1/ In your app project, add the following to `settings.gradle`: | ||
* ```groovy | ||
* include ':is' | ||
* project(':is').projectDir = new File(settingsDir, "../instantsearch-android/ui") | ||
* include ':core' | ||
* project(':core').projectDir = new File(settingsDir, "../instantsearch-android/core") | ||
* ``` | ||
* 2/ In your app's build.gradle, add `implementation project(":is")` | ||
* 3/ In InstantSearch modules `ui` and `core`, uncomment the first line of both build.gradle to apply standalone.gradle | ||
* | ||
* You should now be able to build your application with the local source of IS. | ||
*/ | ||
|
||
buildscript { | ||
apply from: '../libraries.gradle' | ||
} | ||
apply from: "../ext.gradle" | ||
apply from: "../common.gradle" | ||
|
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,18 +1,22 @@ | ||
//apply from: "../standalone.gradle" // Uncomment to use module in another project | ||
|
||
ext { | ||
DESC = "A library and widgets to build instant-search applications on Android." | ||
BASENAME = 'instantsearch-android' | ||
DESC = "A library and widgets to build instant-search applicattions on Android." | ||
BASENAME = 'instantsearch-android-ui' | ||
if (project.hasProperty("LABELS")) { | ||
LABELS += "data-binding" | ||
} | ||
} | ||
|
||
group = GROUP | ||
version = VERSION | ||
|
||
android.dataBinding.enabled true | ||
|
||
dependencies { | ||
implementation fileTree(include: ['*.jar'], dir: 'libs') | ||
implementation project(':core') | ||
api project(':core') | ||
|
||
implementation libraries.glide | ||
implementation libraries.recyclerview | ||
implementation libraries.constraint_layout | ||
} | ||
} | ||
|
||
apply from: '../release.gradle' |