Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.1 #7

Merged
merged 2 commits into from
May 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ Change Log

## Version 1.1

* update gradle plugin to 5.1
* update dependencies
* simplify publishing
* Fix wrong attr id being used for shimmer center width
* Add ability to set ShimmerLayout style with theme attribute

Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "com.android.support:appcompat-v7:$android_support_version"
implementation "com.android.support:recyclerview-v7:$android_support_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation project(':shimmerlayout')

implementation "com.trello.rxlifecycle2:rxlifecycle-kotlin:$rxlifecycle2_version"
Expand All @@ -49,7 +49,7 @@ dependencies {
implementation "io.reactivex.rxjava2:rxjava:$rxjava_version"
}
repositories {
mavenCentral()
jcenter()
maven {
url "https://maven.google.com"
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/xyz/peridy/shimmerdemo/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class MainActivity : RxActivity() {
val imageView: ImageView = itemView.findViewById(R.id.image_view)
}

override fun onViewRecycled(holder: RecyclerView.ViewHolder?) {
override fun onViewRecycled(holder: RecyclerView.ViewHolder) {
(holder as? LoadingViewHolder)?.shimmerLayout?.visibility = View.GONE
super.onViewRecycled(holder)
}
Expand Down
14 changes: 7 additions & 7 deletions common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ ext.scm = 'https://github.com/rnpy/ShimmerLayout.git'
ext.description = 'Simple, memory efficient and high performance Shimmer Layout for Android.'

ext.minSdk = 15
ext.compileSdk = 26
ext.buildTools = "26.0.2"
ext.kotlin_version = '1.2.21'
ext.bintray_version = '1.7.3'
ext.gradle_version = '3.0.1'
ext.android_support_version = '27.0.2'
ext.compileSdk = 28
ext.buildTools = "28.0.3"
ext.kotlin_version = '1.3.31'
ext.bintray_version = '1.8.4'
ext.gradle_version = '3.4.1'
ext.android_support_version = '28.0.0'
ext.maven_gradle_plugin_version = '2.0'
ext.dexcount_version = '0.8.2'

// Demo app
ext.rxlifecycle2_version = '2.2.0'
ext.google_play_services_version = '11.4.0'
ext.rxandroid_version = '2.0.1'
ext.rxandroid_version = '2.1.1'
ext.rxjava_version = '2.1.5'
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri Feb 16 09:16:16 NZDT 2018
#Mon May 27 13:39:29 NZST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
33 changes: 8 additions & 25 deletions publishing.gradle
Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'

project.afterEvaluate {
if (project.plugins.hasPlugin("com.android.library")) {
project.android.libraryVariants.all { variant ->
variant.getOutputs().all { output ->
outputFileName = new File("${project.name}-v${project.version}.aar")
}
}
}
}

project.group = project.ext.group
project.version = project.ext.version

// To publish a new version, set BINTRAY_USERNAME and BINTRAY_API_KEY, then run "clean build bintrayUpload"
bintray {
user = BINTRAY_USERNAME
key = BINTRAY_API_KEY
Expand All @@ -23,10 +11,10 @@ bintray {
licenses = ['BSD 2-Clause']
vcsUrl = project.ext.scm
version {
name = project.version
name = project.ext.version
desc = project.ext.description
released = new Date()
vcsTag = project.version
vcsTag = project.ext.version
}
publications = ['Bintray']
}
Expand Down Expand Up @@ -61,7 +49,7 @@ publishing.publications {
version project.ext.version

artifact sourceJar
artifact "$buildDir/outputs/aar/${project.name}-v${project.version}.aar"
artifact "$buildDir/outputs/aar/${project.name}-release.aar"

//generate pom nodes for dependencies
//when a project references another project, it's artifact node is generated
Expand Down Expand Up @@ -91,21 +79,16 @@ publishing.publications {
}

def getArtifactId() {
return getArtifactId(project)

}

def getArtifactId(someProject) {
if (!someProject.ext.has('artifactId')) {
if (!project.ext.has('artifactId')) {
//default artifactId is the project/module name
return someProject.getName()
return project.getName()

}
return someProject.ext.artifactId
return project.ext.artifactId
}


def addDependencyNodeToPom(dependenciesNode, group, artifact, version) {
static def addDependencyNodeToPom(dependenciesNode, group, artifact, version) {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode("groupId", group)
dependencyNode.appendNode("artifactId", artifact)
Expand Down
4 changes: 2 additions & 2 deletions shimmerlayout/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ android {

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

repositories {
mavenCentral()
jcenter()
maven {
url "https://maven.google.com"
}
Expand Down