diff --git a/bintray.gradle b/bintray.gradle index 11d789c..6afecf5 100644 --- a/bintray.gradle +++ b/bintray.gradle @@ -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 { @@ -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) { diff --git a/build.gradle b/build.gradle index 0ceebb4..b2d7fc2 100644 --- a/build.gradle +++ b/build.gradle @@ -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) { diff --git a/gradle.properties b/gradle.properties index 38c52f1..fff2eab 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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' diff --git a/library/build.gradle b/library/build.gradle index fe14436..8345fc2 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -1,4 +1,5 @@ apply plugin: 'com.android.library' +apply from: rootProject.file('bintray.gradle') android { compileSdkVersion versions.compileSdkVersion @@ -28,6 +29,4 @@ dependencies { implementation libraries.appcompatV7 implementation libraries.design testImplementation 'junit:junit:4.12' -} - -apply from: rootProject.file('bintray.gradle') \ No newline at end of file +} \ No newline at end of file