Skip to content

Commit

Permalink
Uploading artifacts to Maven Central.
Browse files Browse the repository at this point in the history
  • Loading branch information
wellingtoncosta committed Dec 27, 2018
1 parent 122cd77 commit b09e564
Show file tree
Hide file tree
Showing 13 changed files with 240 additions and 102 deletions.
25 changes: 5 additions & 20 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
apply plugin: 'com.github.ben-manes.versions'

version = '3.0.0'

buildscript {
ext.versions = [
android: [
plugin: [
gradle: '3.2.1',
jacoco: '0.1.3',
maven: '2.1'
jacoco: '0.1.3'
],
sdk: [
compile: 28,
Expand Down Expand Up @@ -47,8 +44,7 @@ buildscript {
android: [
plugin: [
gradle: "com.android.tools.build:gradle:$versions.android.plugin.gradle",
jacoco: "com.dicedmelon.gradle:jacoco-android:$versions.jacoco",
maven: "com.github.dcendents:android-maven-gradle-plugin:$versions.android.plugin.maven"
jacoco: "com.dicedmelon.gradle:jacoco-android:$versions.jacoco"
]
],
androidx: [
Expand Down Expand Up @@ -86,8 +82,8 @@ buildscript {

repositories {
google()
jcenter()
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}

dependencies {
Expand All @@ -99,36 +95,25 @@ buildscript {
}
}

allprojects {
repositories {
mavenCentral()
google()
maven { url "https://plugins.gradle.org/m2/" }
maven { url 'https://jitpack.io' }
}
}

subprojects { project ->
project.version = rootProject.version

repositories {
google()
jcenter()
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}

buildscript {
repositories {
google()
jcenter()
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}

dependencies {
classpath "com.android.tools.build:gradle:$versions.android.plugin.gradle"
classpath "com.github.dcendents:android-maven-gradle-plugin:$versions.android.plugin.maven"
}
}

task allDependenciesInsight(type: DependencyInsightReportTask) << {}
}
20 changes: 5 additions & 15 deletions convalida-annotations/build.gradle
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
import com.android.build.gradle.internal.LoggerWrapper
import com.android.build.gradle.internal.SdkHandler

apply plugin: 'java'
apply plugin: 'maven'

group = 'com.github.WellingtonCosta'
apply plugin: 'java-library'

sourceCompatibility = versions.java
targetCompatibility = versions.java

task sourcesJar(type: Jar) {
from sourceSets.main.java.srcDirs
classifier = 'sources'
}

artifacts {
archives sourcesJar
}

def logger = new LoggerWrapper(project.logger)
def sdkHandler = new SdkHandler(project, logger)
for (File file : sdkHandler.sdkLoader.repositories) {
Expand All @@ -27,5 +15,7 @@ for (File file : sdkHandler.sdkLoader.repositories) {
}

dependencies {
implementation deps.androidx.annotations
}
api deps.androidx.annotations
}

apply from: rootProject.file('gradle/gradle-mvn-push.gradle')
3 changes: 3 additions & 0 deletions convalida-annotations/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
POM_NAME=Convalida Annotations
POM_ARTIFACT_ID=convalida-annotations
POM_PACKAGING=jar
18 changes: 4 additions & 14 deletions convalida-compiler/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,11 @@ import com.android.build.gradle.internal.LoggerWrapper
import com.android.build.gradle.internal.SdkHandler
import org.gradle.internal.jvm.Jvm

apply plugin: 'java'
apply plugin: 'maven'

group = 'com.github.WellingtonCosta'
apply plugin: 'java-library'

sourceCompatibility = versions.java
targetCompatibility = versions.java

task sourcesJar(type: Jar) {
from sourceSets.main.java.srcDirs
classifier = 'sources'
}

artifacts {
archives sourcesJar
}

def logger = new LoggerWrapper(project.logger)
def sdkHandler = new SdkHandler(project, logger)
for (File file : sdkHandler.sdkLoader.repositories) {
Expand All @@ -34,4 +22,6 @@ dependencies {
implementation deps.javapoet

compileOnly files(Jvm.current().getToolsJar())
}
}

apply from: rootProject.file('gradle/gradle-mvn-push.gradle')
3 changes: 3 additions & 0 deletions convalida-compiler/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
POM_NAME=Convalida Compiler
POM_ARTIFACT_ID=convalida-compiler
POM_PACKAGING=jar
16 changes: 3 additions & 13 deletions convalida-databinding/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'

group = 'com.github.WellingtonCosta'

android {
compileSdkVersion versions.android.sdk.compile
Expand All @@ -26,17 +23,10 @@ android {
}
}

task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}

artifacts {
archives sourcesJar
}

dependencies {
api project(':convalida-validators')

implementation deps.google.material
}
}

apply from: rootProject.file('gradle/gradle-mvn-push.gradle')
3 changes: 3 additions & 0 deletions convalida-databinding/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
POM_NAME=Convalida Data Binding
POM_ARTIFACT_ID=convalida-databinding
POM_PACKAGING=aar
16 changes: 3 additions & 13 deletions convalida-runtime/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'

group = 'com.github.WellingtonCosta'

android {
compileSdkVersion versions.android.sdk.compile
Expand All @@ -22,17 +19,10 @@ android {
}
}

task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}

artifacts {
archives sourcesJar
}

dependencies {
api project(':convalida-annotations')
api project(':convalida-validators')
api project(':convalida-databinding')
}
}

apply from: rootProject.file('gradle/gradle-mvn-push.gradle')
3 changes: 3 additions & 0 deletions convalida-runtime/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
POM_NAME=Convalida Runtime
POM_ARTIFACT_ID=convalida-runtime
POM_PACKAGING=aar
16 changes: 3 additions & 13 deletions convalida-validators/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
apply plugin: 'com.android.library'
apply plugin: 'jacoco-android'
apply plugin: 'com.github.dcendents.android-maven'

group = 'com.github.WellingtonCosta'

android {
compileSdkVersion versions.android.sdk.compile
Expand All @@ -17,15 +14,6 @@ android {
}
}

task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}

artifacts {
archives sourcesJar
}

dependencies {
implementation deps.google.material
testImplementation deps.test.junit
Expand All @@ -45,4 +33,6 @@ jacocoAndroidUnitTestReport {

repositories {
mavenCentral()
}
}

apply from: rootProject.file('gradle/gradle-mvn-push.gradle')
3 changes: 3 additions & 0 deletions convalida-validators/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
POM_NAME=Convalida Validators
POM_ARTIFACT_ID=convalida-validators
POM_PACKAGING=aar
31 changes: 17 additions & 14 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
# Project-wide Gradle settings.
# Maven Publish Properties
GROUP=io.github.wellingtoncosta
VERSION_NAME=3.0.0-SNAPSHOT

# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
POM_DESCRIPTION=A field validation library fro Android.

# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
POM_URL=https://github.com/WellingtonCosta/convalida/
POM_SCM_URL=https://github.com/WellingtonCosta/convalida/
POM_SCM_CONNECTION=scm:git:git://github.com/WellingtonCosta/convalida.git
POM_SCM_DEV_CONNECTION=scm:git:ssh://git@github.com/WellingtonCosta/convalida.git

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
POM_LICENCE_NAME=The Apache Software License, Version 2.0
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
POM_LICENCE_DIST=repo

# When configured, Gradle will run in incubating parallel mode.
# 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
POM_DEVELOPER_ID=wellingtoncosta
POM_DEVELOPER_NAME=Wellington Costa

kotlin.code.style=official
# Gradle Properties
org.gradle.jvmargs=-Xmx1536m
org.gradle.parallel=true

# AndroidX
android.useAndroidX=true
android.enableJetifier=true
Loading

0 comments on commit b09e564

Please sign in to comment.