Skip to content

Commit

Permalink
register maven
Browse files Browse the repository at this point in the history
  • Loading branch information
hyogeun.park committed Dec 4, 2017
1 parent 7ce4c1e commit e226ed7
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 48 deletions.
107 changes: 70 additions & 37 deletions bintray.gradle
Original file line number Diff line number Diff line change
@@ -1,42 +1,29 @@
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'com.novoda.bintray-release'

Properties properties = new Properties()
try {
properties.load(project.rootProject.file('local.properties').newDataInputStream())
} catch (FileNotFoundException ignore) {}

bintray {
user = properties.bintrayUser
key = properties.bintrayApiKey

configurations = ['archives'] // When uploading configuration files

pkg {
repo = 'maven' // Repository name (Created in the repository Bintray site)
name = ARTIFACT_ID // module name
desc = LIBRARY_DESCRIPTION // Optional
licenses = ['Apache-2.0']

vcsUrl = GIT_URL
websiteUrl = SITE_URL
issueTrackerUrl = ISSUE_URL

labels = ['aar', 'android', 'example'] // Optional
publish = true // [Default: false] Whether version should be auto published after an upload
publicDownloadNumbers = true
publish {
userOrg = properties.getProperty("bintray.user")
groupId = 'com.hyopark'
artifactId = 'gradationpager'
publishVersion = versions.versionName
desc = LIBRARY_DESCRIPTION
website = SITE_URL
issueTracker = ISSUE_URL
repository = GIT_URL
}

githubRepo = REPO // Optional Github repository
githubReleaseNotesFile = 'README.md' // Optional Github readme file
// 동작 안함 확인 필요
/*apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
version {
name = versions.versionName // The name of your library project
desc = LIBRARY_DESCRIPTION // Optional - Version-specific description'
released = new Date() // Optional - Date of the version release. 2 possible values: date in the format of 'yyyy-MM-dd'T'HH:mm:ss.SSSZZ' OR a java.util.Date instance
vcsTag = versions.versionName
}
}
}
Properties properties = new Properties()
try {
properties.load(project.rootProject.file('local.properties').newDataInputStream())
} catch (FileNotFoundException ignore) {}
install {
repositories.mavenInstaller {
Expand Down Expand Up @@ -74,19 +61,65 @@ install {
}
}
bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")
configurations = ['archives'] // When uploading configuration files
pkg {
repo = 'maven' // Repository name (Created in the repository Bintray site)
name = ARTIFACT_ID // module name
userOrg = user
desc = LIBRARY_DESCRIPTION // Optional
licenses = ['Apache-2.0']
vcsUrl = GIT_URL
websiteUrl = SITE_URL
issueTrackerUrl = ISSUE_URL
labels = ['aar', 'android', 'example'] // Optional
publish = true // [Default: false] Whether version should be auto published after an upload
publicDownloadNumbers = true
githubRepo = REPO // Optional Github repository
githubReleaseNotesFile = 'README.md' // Optional Github readme file
version {
name = versions.versionName // The name of your library project
desc = LIBRARY_DESCRIPTION // Optional - Version-specific description'
released = new Date() // Optional - Date of the version release. 2 possible values: date in the format of 'yyyy-MM-dd'T'HH:mm:ss.SSSZZ' OR a java.util.Date instance
vcsTag = versions.versionName
attributes = ['gradle-plugin': 'com.use.less:com.use.less.gradle:gradle-useless-plugin']
}
}
}
// JCenter publish
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
if (project.hasProperty("android")) { // Android libraries
task sourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
}
task javadoc(type: Javadoc) {
options.addBooleanOption('Xdoclint:none', true)
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}
} else { // Java libraries
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
}
artifacts {
archives sourcesJar
}
}*/

task findConventions << {
/*task findConventions << {
println project.getConvention()
}
}*/

/*
task javadoc(type: Javadoc) {
Expand Down
19 changes: 12 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,34 +1,39 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply from: 'dependencies.gradle'

buildscript {
ext.kotlin_version = '1.1.51'
repositories {
jcenter()
mavenCentral()
maven {
url "https://dl.bintray.com/hyogeunpark/maven/"
}
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
classpath 'com.novoda:bintray-release:0.7.0'
// classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
// classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.51"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
apply from: 'dependencies.gradle'
}

allprojects {
repositories {
jcenter()
mavenCentral()
maven {
url "https://dl.bintray.com/hyogeunpark/maven/"
}
google()
}

group = GROUP_ID
version = versions.versionName
// group = GROUP_ID
// version = versions.versionName
}

task clean(type: Delete) {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ org.gradle.jvmargs=-Xmx1536m
# 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
# org.gradle.parallel=true
GROUP_ID='com.hyogeun'
GROUP_ID='com.hyopark'
ARTIFACT_ID='gradationpager'
REPO = 'hyogeunpark/gradationpager'

Expand Down
5 changes: 2 additions & 3 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apply plugin: 'com.android.library'
apply from: rootProject.file('bintray.gradle')

android {
compileSdkVersion versions.compileSdkVersion
Expand Down Expand Up @@ -28,6 +29,4 @@ dependencies {
implementation libraries.appcompatV7
implementation libraries.design
testImplementation 'junit:junit:4.12'
}

apply from: rootProject.file('bintray.gradle')
}

0 comments on commit e226ed7

Please sign in to comment.