Skip to content

Commit

Permalink
Configrate the Jcenter repositories.
Browse files Browse the repository at this point in the history
  • Loading branch information
qingmei2 committed Jan 24, 2018
1 parent 8b9aac7 commit 9a5d85a
Show file tree
Hide file tree
Showing 7 changed files with 92 additions and 22 deletions.
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ apply from: "config.gradle"

buildscript {
ext.kotlin_version = '1.2.20'
ext.kotlin_version = '1.2.10'
repositories {
jcenter()
mavenCentral()
Expand All @@ -13,6 +12,9 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down
86 changes: 86 additions & 0 deletions rximagepicker/bintray.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
apply plugin: 'com.jfrog.bintray'
apply plugin: 'com.github.dcendents.android-maven'

Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())

def siteUrl = 'https://github.com/qingmei2/RxImagePicker'
def gitUrl = 'https://github.com/qingmei2/RxImagePicker.git'

group = "com.github.qingmei2"
def libName = "RxImagePicker"
version = "0.1.0-alpha"

bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")
configurations = ['archives']
pkg {
repo = 'maven'
name = libName
licenses = ["MIT"]
websiteUrl = siteUrl
vcsUrl = gitUrl
publish = true

version {
name = rootProject.ext.android["versionName"]
desc = 'A common Architecture for Android Applications developing based on MVP,integrates many Open Source Projects( like Dagger2,RxJava,Retrofit... ),to make your developing quicker and easier.'
released = new Date()
vcsTag = 'v' + rootProject.ext.android["versionName"]
attributes = ['gradle-plugin': 'com.use.less:com.use.less.gradle:gradle-useless-plugin']
}
}
}

install {
repositories.mavenInstaller {
// This generates POM.xml with proper parameters
pom {
project {
packaging 'aar'
// Add your description here
name libName
description 'The library which choosing pictures from camera or gallery in Android.'
url siteUrl
// Set your license
licenses {
license {
name 'The MIT License'
url 'https://github.com/qingmei2/RxImagePicker/blob/master/LICENSE'
}
}
developers {
developer {
id 'qingmei2'
name 'qingmei2'
email '[email protected]'
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl
}
}
}
}
}

task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}
task javadoc(type: Javadoc) {
failOnError false
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives javadocJar
archives sourcesJar
}
6 changes: 3 additions & 3 deletions rximagepicker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ android {
}

dependencies {
implementation rootProject.ext.dependencies["appcompat-v7"]
api rootProject.ext.dependencies["appcompat-v7"]
api rootProject.ext.dependencies["rxJava2"]
api rootProject.ext.dependencies["rxandroid"]
implementation rootProject.ext.dependencies["dagger"]
api rootProject.ext.dependencies["dagger"]
annotationProcessor rootProject.ext.dependencies["dagger-compiler"]
testImplementation rootProject.ext.dependencies["junit"]
testImplementation rootProject.ext.dependencies["kotlin-android"]
Expand All @@ -37,4 +37,4 @@ dependencies {
repositories {
mavenCentral()
}

apply from: 'bintray.gradle'
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
package com.qingmei2.rximagepicker.di.scheduler;

import android.support.annotation.RestrictTo;

import io.reactivex.Scheduler;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;

import static android.support.annotation.RestrictTo.Scope.LIBRARY;

/**
* An extra layer of packaging, using {@link IRxImagePickerSchedulers} for control thread switch.
* <p>
* Use {@link Schedulers#io()} and {@link AndroidSchedulers#mainThread()} directly is not
* conducive to unit testing, you should use {@link RxImagePickerTestSchedulers} for inject {@link Scheduler}
* in the testing.
*/
@RestrictTo(LIBRARY)
public class RxImagePickerSchedulers implements IRxImagePickerSchedulers {

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
package com.qingmei2.rximagepicker.di.scheduler;

import android.support.annotation.RestrictTo;

import io.reactivex.Scheduler;
import io.reactivex.schedulers.Schedulers;

import static android.support.annotation.RestrictTo.Scope.TESTS;

/**
* An extra layer of packaging, using {@link RxImagePickerTestSchedulers} for easier testing.
*/
@RestrictTo(TESTS)
public class RxImagePickerTestSchedulers implements IRxImagePickerSchedulers {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import android.content.Intent;
import android.net.Uri;
import android.provider.MediaStore;
import android.support.annotation.RestrictTo;

import com.qingmei2.rximagepicker.ui.BaseSystemPickerView;
import com.qingmei2.rximagepicker.ui.ICameraPickerView;
Expand All @@ -17,9 +16,6 @@

import io.reactivex.Observable;

import static android.support.annotation.RestrictTo.Scope.LIBRARY;

@RestrictTo(LIBRARY)
public final class RxSystemCameraPickerView extends BaseSystemPickerView implements ICameraPickerView {

private static final String TAG = RxSystemCameraPickerView.class.getSimpleName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,12 @@
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.support.annotation.RestrictTo;

import com.qingmei2.rximagepicker.ui.BaseSystemPickerView;
import com.qingmei2.rximagepicker.ui.IGalleryPickerView;

import io.reactivex.Observable;

import static android.support.annotation.RestrictTo.Scope.LIBRARY;

@RestrictTo(LIBRARY)
public final class RxSystemGalleryPickerView extends BaseSystemPickerView implements IGalleryPickerView {

private static final String TAG = RxSystemGalleryPickerView.class.getSimpleName();
Expand Down

0 comments on commit 9a5d85a

Please sign in to comment.