Skip to content

Commit

Permalink
1.3.0: Update Event-Emitter to 1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhuinden committed Aug 13, 2022
1 parent 94ab2d2 commit 4ac2bd4
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 18 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change log

-Live-Event 1.3.0 (2022-08-13)
--------------------------------
- Update event-emitter to 1.3.0.

-Live-Event 1.2.0 (2020-12-24)
--------------------------------
- Update event-emitter to 1.2.0 (transitively update command-queue to 1.2.0).
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ dependencyResolutionManagement {

and add the compile dependency to your module level gradle.

implementation 'com.github.Zhuinden:live-event:1.2.0'
implementation 'com.github.Zhuinden:live-event:1.3.0'

## License

Expand Down
6 changes: 3 additions & 3 deletions live-event-sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apply plugin: 'kotlin-parcelize'
apply plugin: 'kotlin-kapt'

android {
compileSdkVersion 28
compileSdkVersion 30

compileOptions {
sourceCompatibility 1.8
Expand All @@ -16,7 +16,7 @@ android {
defaultConfig {
applicationId "com.zhuinden.liveeventsample"
minSdkVersion 16
targetSdkVersion 28
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Expand Down Expand Up @@ -60,6 +60,6 @@ dependencies {
implementation 'com.jakewharton.rxbinding2:rxbinding:2.2.0'
implementation 'com.jakewharton.rxrelay2:rxrelay:2.1.1'

implementation 'com.github.Zhuinden:simple-stack:2.5.0'
implementation 'com.github.Zhuinden:simple-stack:2.6.4'
implementation 'com.github.Zhuinden:simple-stack-extensions:2.1.0'
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.zhuinden.liveeventsample.application

import android.os.Bundle
import android.view.ViewGroup
import android.view.Window
import androidx.appcompat.app.AppCompatActivity
import com.zhuinden.simplestack.History
Expand All @@ -24,7 +25,7 @@ class MainActivity : AppCompatActivity(), SimpleStateChanger.NavigationHandler {

setContentView(R.layout.activity_main)

val binding = ActivityMainBinding.bind(findViewById(Window.ID_ANDROID_CONTENT))
val binding = ActivityMainBinding.bind((findViewById(Window.ID_ANDROID_CONTENT) as ViewGroup).getChildAt(0))

fragmentStateChanger = DefaultFragmentStateChanger(supportFragmentManager, R.id.fragmentRoot)

Expand Down
82 changes: 69 additions & 13 deletions live-event/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'com.github.dcendents.android-maven'

apply plugin: 'maven-publish'

group = "com.github.Zhuinden.live-event"
version = "1.3.0"


android {
compileSdkVersion 28
compileSdkVersion 30
defaultConfig {
minSdkVersion 16
targetSdkVersion 28
targetSdkVersion 30
versionCode 1
versionName "1.0.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand All @@ -29,7 +33,9 @@ dependencies {
api "com.google.code.findbugs:jsr305:3.0.2"
api "androidx.lifecycle:lifecycle-runtime-ktx:2.2.0"
api "androidx.lifecycle:lifecycle-livedata-ktx:2.2.0"
api 'com.github.Zhuinden:event-emitter:1.2.0'
api('com.github.Zhuinden:event-emitter:1.3.0') {
transitive = true
}

testImplementation 'junit:junit:4.13.1'
testImplementation 'org.assertj:assertj-core:3.16.1'
Expand All @@ -39,20 +45,23 @@ dependencies {
androidTestImplementation 'com.github.Zhuinden:espresso-helper:1.0.0'
}

// build a jar with source files
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}

task javadoc(type: Javadoc) {
configurations.implementation.canBeResolved(true)
configurations.api.canBeResolved(true)

failOnError false
source = android.sourceSets.main.java.sourceFiles

source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
classpath += configurations.compile
//destinationDir = file("../javadoc/")
classpath += configurations.api
}

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

// build a jar with javadoc
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
Expand All @@ -62,3 +71,50 @@ artifacts {
archives sourcesJar
archives javadocJar
}

// Because the components are created only during the afterEvaluate phase, you must
// configure your publications using the afterEvaluate() lifecycle method.
afterEvaluate {
publishing {
publications {
// Creates a Maven publication called "release".
release(MavenPublication) {
// Applies the component for the release build variant.
from components.release
artifact(sourcesJar)

// You can then customize attributes of the publication as shown below.
groupId = 'com.github.Zhuinden'
artifactId = 'live-event'
version = '1.3.0'

pom.withXml {
def dependenciesNode = (asNode().get("dependencies") as groovy.util.NodeList).get(0) as groovy.util.Node
def configurationNames = ["implementation", "api"]

configurationNames.forEach { configurationName ->
configurations[configurationName].allDependencies.forEach {
if (it.group != null && it.version != "unspecified") {
def dependencyNode = dependenciesNode.appendNode("dependency")
dependencyNode.appendNode("groupId", it.group)
dependencyNode.appendNode("artifactId", it.name)
dependencyNode.appendNode("version", it.version)
// dependencyNode.appendNode("scope", configurationName)
}
}
}

def dependencyNode = dependenciesNode.appendNode("dependency")
dependencyNode.appendNode("groupId", "com.github.Zhuinden")
dependencyNode.appendNode("artifactId", "event-emitter")
dependencyNode.appendNode("version", "1.3.0")

def dependencyNode2 = dependenciesNode.appendNode("dependency")
dependencyNode2.appendNode("groupId", "com.github.Zhuinden")
dependencyNode2.appendNode("artifactId", "command-queue")
dependencyNode2.appendNode("version", "1.2.0")
}
}
}
}
}

0 comments on commit 4ac2bd4

Please sign in to comment.