Gradle support for publishing to bintray (#720) r=ncalexan
* Rename SDK package name from com.mozilla.mentat to org.mozilla.mentat * Gradle configuration for publishing to a bintray repository
This commit is contained in:
parent
b0421c61b4
commit
250e35b726
31 changed files with 97 additions and 34 deletions
|
@ -2,6 +2,11 @@
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
ext.kotlin_version = '1.2.41'
|
ext.kotlin_version = '1.2.41'
|
||||||
|
|
||||||
|
ext.library = [
|
||||||
|
version: '0.3.1'
|
||||||
|
]
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
jcenter()
|
||||||
google()
|
google()
|
||||||
|
@ -10,6 +15,10 @@ buildscript {
|
||||||
classpath 'com.android.tools.build:gradle:3.1.2'
|
classpath 'com.android.tools.build:gradle:3.1.2'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
|
|
||||||
|
// Publish.
|
||||||
|
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
|
||||||
|
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
// in the individual module build.gradle files
|
// in the individual module build.gradle files
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,3 +15,12 @@ org.gradle.jvmargs=-Xmx1536m
|
||||||
# This option should only be used with decoupled projects. More details, visit
|
# This option should only be used with decoupled projects. More details, visit
|
||||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||||
# org.gradle.parallel=true
|
# org.gradle.parallel=true
|
||||||
|
|
||||||
|
libGroupId=org.mozilla.mentat
|
||||||
|
libRepositoryName=Mentat
|
||||||
|
libProjectName=mentat
|
||||||
|
libProjectDescription=A persistent, relational store inspired by Datomic and DataScript.
|
||||||
|
libUrl=https://github.com/mozilla/mentat
|
||||||
|
libVcsUrl=https://github.com/mozilla/mentat.git
|
||||||
|
|
||||||
|
libLicense=MPL-2.0
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
|
apply plugin: 'com.jfrog.bintray'
|
||||||
|
// Simply applying this plugin gets bintray to publish a pom file.
|
||||||
|
apply plugin: 'com.github.dcendents.android-maven'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 27
|
compileSdkVersion 27
|
||||||
|
@ -46,3 +49,51 @@ dependencies {
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Publishing to jcenter/bintray.
|
||||||
|
def libGroupId = properties.libGroupId
|
||||||
|
def libRepoName = properties.libRepositoryName
|
||||||
|
def libProjectName = properties.libProjectName
|
||||||
|
def libProjectDescription = properties.libProjectDescription
|
||||||
|
def libUrl = properties.libUrl
|
||||||
|
def libVcsUrl = properties.libVcsUrl
|
||||||
|
def libLicense = properties.libLicense
|
||||||
|
|
||||||
|
Properties localProperties = null
|
||||||
|
if (project.rootProject.file('local.properties').canRead()) {
|
||||||
|
localProperties = new Properties()
|
||||||
|
localProperties.load(project.rootProject.file('local.properties').newDataInputStream())
|
||||||
|
}
|
||||||
|
|
||||||
|
version = rootProject.ext.library['version']
|
||||||
|
|
||||||
|
task sourcesJar(type: Jar) {
|
||||||
|
from android.sourceSets.main.java.srcDirs
|
||||||
|
classifier = 'sources'
|
||||||
|
}
|
||||||
|
|
||||||
|
artifacts {
|
||||||
|
archives sourcesJar
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
group = libGroupId
|
||||||
|
archivesBaseName = libProjectName
|
||||||
|
|
||||||
|
bintray {
|
||||||
|
user = localProperties != null ? localProperties.getProperty("bintray.user") : ""
|
||||||
|
key = localProperties != null ? localProperties.getProperty("bintray.apikey") : ""
|
||||||
|
|
||||||
|
configurations = ['archives']
|
||||||
|
pkg {
|
||||||
|
repo = libRepoName
|
||||||
|
name = libProjectName
|
||||||
|
userOrg = "grisha" // Temporary org name until package is on jcenter. Issue #725.
|
||||||
|
desc = libProjectDescription
|
||||||
|
websiteUrl = libUrl
|
||||||
|
vcsUrl = libVcsUrl
|
||||||
|
licenses = [libLicense]
|
||||||
|
publish = true
|
||||||
|
publicDownloadNumbers = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||||
* specific language governing permissions and limitations under the License. */
|
* specific language governing permissions and limitations under the License. */
|
||||||
|
|
||||||
package com.mozilla.mentat;
|
package org.mozilla.mentat;
|
||||||
|
|
||||||
import java.util.EventListener;
|
import java.util.EventListener;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||||
* specific language governing permissions and limitations under the License. */
|
* specific language governing permissions and limitations under the License. */
|
||||||
|
|
||||||
package com.mozilla.mentat;
|
package org.mozilla.mentat;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.res.AssetManager;
|
import android.content.res.AssetManager;
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.mozilla.mentat">
|
package="org.mozilla.mentat">
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
</manifest>
|
</manifest>
|
|
@ -8,7 +8,7 @@
|
||||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||||
* specific language governing permissions and limitations under the License. */
|
* specific language governing permissions and limitations under the License. */
|
||||||
|
|
||||||
package com.mozilla.mentat;
|
package org.mozilla.mentat;
|
||||||
|
|
||||||
import com.sun.jna.Structure;
|
import com.sun.jna.Structure;
|
||||||
import com.sun.jna.ptr.IntByReference;
|
import com.sun.jna.ptr.IntByReference;
|
|
@ -8,7 +8,7 @@
|
||||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||||
* specific language governing permissions and limitations under the License. */
|
* specific language governing permissions and limitations under the License. */
|
||||||
|
|
||||||
package com.mozilla.mentat;
|
package org.mozilla.mentat;
|
||||||
|
|
||||||
public enum CacheDirection {
|
public enum CacheDirection {
|
||||||
FORWARD, REVERSE, BOTH
|
FORWARD, REVERSE, BOTH
|
|
@ -8,7 +8,7 @@
|
||||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||||
* specific language governing permissions and limitations under the License. */
|
* specific language governing permissions and limitations under the License. */
|
||||||
|
|
||||||
package com.mozilla.mentat;
|
package org.mozilla.mentat;
|
||||||
|
|
||||||
import com.sun.jna.Pointer;
|
import com.sun.jna.Pointer;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||||
* specific language governing permissions and limitations under the License. */
|
* specific language governing permissions and limitations under the License. */
|
||||||
|
|
||||||
package com.mozilla.mentat;
|
package org.mozilla.mentat;
|
||||||
|
|
||||||
import com.sun.jna.Pointer;
|
import com.sun.jna.Pointer;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||||
* specific language governing permissions and limitations under the License. */
|
* specific language governing permissions and limitations under the License. */
|
||||||
|
|
||||||
package com.mozilla.mentat;
|
package org.mozilla.mentat;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface defining the structure of a callback from a query returning a {@link CollResult}.
|
* Interface defining the structure of a callback from a query returning a {@link CollResult}.
|
|
@ -8,15 +8,13 @@
|
||||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||||
* specific language governing permissions and limitations under the License. */
|
* specific language governing permissions and limitations under the License. */
|
||||||
|
|
||||||
package com.mozilla.mentat;
|
package org.mozilla.mentat;
|
||||||
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.sun.jna.Memory;
|
|
||||||
import com.sun.jna.Pointer;
|
import com.sun.jna.Pointer;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.ByteBuffer;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||||
* specific language governing permissions and limitations under the License. */
|
* specific language governing permissions and limitations under the License. */
|
||||||
|
|
||||||
package com.mozilla.mentat;
|
package org.mozilla.mentat;
|
||||||
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||||
* specific language governing permissions and limitations under the License. */
|
* specific language governing permissions and limitations under the License. */
|
||||||
|
|
||||||
package com.mozilla.mentat;
|
package org.mozilla.mentat;
|
||||||
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||||
* specific language governing permissions and limitations under the License. */
|
* specific language governing permissions and limitations under the License. */
|
||||||
|
|
||||||
package com.mozilla.mentat;
|
package org.mozilla.mentat;
|
||||||
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||||
* specific language governing permissions and limitations under the License. */
|
* specific language governing permissions and limitations under the License. */
|
||||||
|
|
||||||
package com.mozilla.mentat;
|
package org.mozilla.mentat;
|
||||||
|
|
||||||
import com.sun.jna.Library;
|
import com.sun.jna.Library;
|
||||||
import com.sun.jna.Native;
|
import com.sun.jna.Native;
|
|
@ -8,7 +8,7 @@
|
||||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||||
* specific language governing permissions and limitations under the License. */
|
* specific language governing permissions and limitations under the License. */
|
||||||
|
|
||||||
package com.mozilla.mentat;
|
package org.mozilla.mentat;
|
||||||
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
|
@ -8,14 +8,12 @@
|
||||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||||
* specific language governing permissions and limitations under the License. */
|
* specific language governing permissions and limitations under the License. */
|
||||||
|
|
||||||
package com.mozilla.mentat;
|
package org.mozilla.mentat;
|
||||||
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.sun.jna.Memory;
|
|
||||||
import com.sun.jna.Pointer;
|
import com.sun.jna.Pointer;
|
||||||
|
|
||||||
import java.nio.ByteBuffer;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||||
* specific language governing permissions and limitations under the License. */
|
* specific language governing permissions and limitations under the License. */
|
||||||
|
|
||||||
package com.mozilla.mentat;
|
package org.mozilla.mentat;
|
||||||
|
|
||||||
import com.sun.jna.Pointer;
|
import com.sun.jna.Pointer;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||||
* specific language governing permissions and limitations under the License. */
|
* specific language governing permissions and limitations under the License. */
|
||||||
|
|
||||||
package com.mozilla.mentat;
|
package org.mozilla.mentat;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface defining the structure of a callback from a query returning a {@link RelResult}.
|
* Interface defining the structure of a callback from a query returning a {@link RelResult}.
|
|
@ -8,7 +8,7 @@
|
||||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||||
* specific language governing permissions and limitations under the License. */
|
* specific language governing permissions and limitations under the License. */
|
||||||
|
|
||||||
package com.mozilla.mentat;
|
package org.mozilla.mentat;
|
||||||
|
|
||||||
import com.sun.jna.Pointer;
|
import com.sun.jna.Pointer;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||||
* specific language governing permissions and limitations under the License. */
|
* specific language governing permissions and limitations under the License. */
|
||||||
|
|
||||||
package com.mozilla.mentat;
|
package org.mozilla.mentat;
|
||||||
|
|
||||||
import com.sun.jna.Memory;
|
import com.sun.jna.Memory;
|
||||||
import com.sun.jna.Pointer;
|
import com.sun.jna.Pointer;
|
|
@ -8,7 +8,7 @@
|
||||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||||
* specific language governing permissions and limitations under the License. */
|
* specific language governing permissions and limitations under the License. */
|
||||||
|
|
||||||
package com.mozilla.mentat;
|
package org.mozilla.mentat;
|
||||||
|
|
||||||
import com.sun.jna.Pointer;
|
import com.sun.jna.Pointer;
|
||||||
import com.sun.jna.Structure;
|
import com.sun.jna.Structure;
|
|
@ -8,7 +8,7 @@
|
||||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||||
* specific language governing permissions and limitations under the License. */
|
* specific language governing permissions and limitations under the License. */
|
||||||
|
|
||||||
package com.mozilla.mentat;
|
package org.mozilla.mentat;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface defining the structure of a callback from a query returning a single {@link TypedValue}.
|
* Interface defining the structure of a callback from a query returning a single {@link TypedValue}.
|
|
@ -8,11 +8,10 @@
|
||||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||||
* specific language governing permissions and limitations under the License. */
|
* specific language governing permissions and limitations under the License. */
|
||||||
|
|
||||||
package com.mozilla.mentat;
|
package org.mozilla.mentat;
|
||||||
|
|
||||||
import com.sun.jna.Pointer;
|
import com.sun.jna.Pointer;
|
||||||
|
|
||||||
import java.nio.ByteBuffer;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||||
* specific language governing permissions and limitations under the License. */
|
* specific language governing permissions and limitations under the License. */
|
||||||
|
|
||||||
package com.mozilla.mentat;
|
package org.mozilla.mentat;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface defining the structure of a callback from a query returning a {@link TupleResult}.
|
* Interface defining the structure of a callback from a query returning a {@link TupleResult}.
|
|
@ -8,7 +8,7 @@
|
||||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||||
* specific language governing permissions and limitations under the License. */
|
* specific language governing permissions and limitations under the License. */
|
||||||
|
|
||||||
package com.mozilla.mentat;
|
package org.mozilla.mentat;
|
||||||
|
|
||||||
import com.sun.jna.Pointer;
|
import com.sun.jna.Pointer;
|
||||||
import com.sun.jna.Structure;
|
import com.sun.jna.Structure;
|
|
@ -8,7 +8,7 @@
|
||||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||||
* specific language governing permissions and limitations under the License. */
|
* specific language governing permissions and limitations under the License. */
|
||||||
|
|
||||||
package com.mozilla.mentat;
|
package org.mozilla.mentat;
|
||||||
|
|
||||||
import com.sun.jna.Structure;
|
import com.sun.jna.Structure;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||||
* specific language governing permissions and limitations under the License. */
|
* specific language governing permissions and limitations under the License. */
|
||||||
|
|
||||||
package com.mozilla.mentat;
|
package org.mozilla.mentat;
|
||||||
|
|
||||||
import com.sun.jna.Callback;
|
import com.sun.jna.Callback;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||||
* specific language governing permissions and limitations under the License. */
|
* specific language governing permissions and limitations under the License. */
|
||||||
|
|
||||||
package com.mozilla.mentat;
|
package org.mozilla.mentat;
|
||||||
|
|
||||||
import com.sun.jna.Pointer;
|
import com.sun.jna.Pointer;
|
||||||
|
|
|
@ -8,11 +8,10 @@
|
||||||
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||||
* specific language governing permissions and limitations under the License. */
|
* specific language governing permissions and limitations under the License. */
|
||||||
|
|
||||||
package com.mozilla.mentat;
|
package org.mozilla.mentat;
|
||||||
|
|
||||||
import com.sun.jna.Pointer;
|
import com.sun.jna.Pointer;
|
||||||
|
|
||||||
import java.nio.ByteBuffer;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
Loading…
Reference in a new issue