Skip to content

Commit

Permalink
DPMS-11800 Update anvil's version and publishing info (Part4) (oxeanb…
Browse files Browse the repository at this point in the history
…its#18)

* Add auxiliar anvil components to do renderization

* Remove redundant core folder inside of core module

* Add group and application name for publishing

* Add configuration for publishing sources, javadoc and aar file

* Update lib of anvil to anvil-sdk21

* Add missing properties to extra in gradle
  • Loading branch information
dnovaes authored Apr 15, 2020
1 parent 784e3c3 commit fe8cb49
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 4 deletions.
3 changes: 1 addition & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ dependencies {
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0'

implementation 'co.trikita:anvil-sdk15:0.5.2'
implementation 'co.trikita:anvil-design:0.5.2'
implementation 'co.trikita:anvil-sdk21:0.5.21'

implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'

Expand Down
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

ext.groupName = GROUP
ext.applicationName = APPLICATION

buildscript {
ext.kotlin_version = '1.3.50'
repositories {
Expand Down
46 changes: 44 additions & 2 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'maven-publish'

group = "com.github.oxeanbits"

Expand All @@ -23,12 +24,53 @@ android {
}
}

task javadoc(type: Javadoc) {
excludes = ['**/*.kt'] // < ---- Exclude all kotlin files from javadoc file.
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}

task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier.set('javadoc')
from javadoc.destinationDir
}

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

project.afterEvaluate {
publishing {
publications {
forecastChart(MavenPublication) {
group groupName
version android.defaultConfig.versionName
artifactId applicationName
artifact bundleRelease
artifact sourcesJar
artifact javadocJar

pom.withXml {
def dependenciesNode = asNode().appendNode('dependencies')
configurations.compile.allDependencies.each { dependency ->
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', dependency.group)
dependencyNode.appendNode('artifactId', dependency.name)
dependencyNode.appendNode('version', dependency.version)
}
}
}
}
}
}


dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

implementation 'co.trikita:anvil-sdk15:0.5.2'
implementation 'co.trikita:anvil-design:0.5.2'
implementation 'co.trikita:anvil-sdk21:0.5.21'

implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'

Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ android.enableJetifier=true

# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official

GROUP = com.oxeanbits
APPLICATION = forecastchart

0 comments on commit fe8cb49

Please sign in to comment.