diff --git a/README.md b/README.md index c0becc0..2190433 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,6 @@ An TreeView implement in Android with RecyclerView written in kotlin. - [x] Select or Deselect Node - [x] Better TreeNodeGenerator API -- [ ] Sorted Data in - [ ] More API to operate the node in the tree, such as expand, collapse, etc. - [ ] Draggable nodes @@ -31,7 +30,7 @@ An TreeView implement in Android with RecyclerView written in kotlin. - Add the dependency to your gradle file ```groovy -implementation("io.github.dingyi222666:treeview:1.1.0") +implementation("io.github.dingyi222666:treeview:1.2.0") ``` - Use the `DataSource` DSL to create tree used for the TreeView. Also you can [use the `TreeNodeGenerator`](https://github.com/dingyi222666/TreeView/issues/4) to create the tree. diff --git a/app/src/main/java/com/dingyi/treeview/FileActivity.kt b/app/src/main/java/com/dingyi/treeview/FileActivity.kt index 2c5c27d..651ec65 100644 --- a/app/src/main/java/com/dingyi/treeview/FileActivity.kt +++ b/app/src/main/java/com/dingyi/treeview/FileActivity.kt @@ -327,10 +327,8 @@ class FileNodeGenerator( ) } - } - class FileListLoader { private val cacheFiles = mutableMapOf>() diff --git a/treeview/build.gradle.kts b/treeview/build.gradle.kts index 4f622f0..5d669aa 100644 --- a/treeview/build.gradle.kts +++ b/treeview/build.gradle.kts @@ -1,8 +1,9 @@ plugins { id("com.android.library") id("org.jetbrains.kotlin.android") - id("com.vanniktech.maven.publish") version "0.23.1" + id("com.vanniktech.maven.publish") version "0.25.2" id("maven-publish") + signing } android { @@ -34,12 +35,14 @@ android { } } + + mavenPublishing { publishToMavenCentral(com.vanniktech.maven.publish.SonatypeHost.S01) signAllPublications() - coordinates("io.github.dingyi222666", "treeview", "1.1.0") + coordinates("io.github.dingyi222666", "treeview", "1.2.0") pom { name.set("TreeView") @@ -69,6 +72,7 @@ mavenPublishing { } + dependencies { compileOnly("androidx.core:core-ktx:1.9.0") compileOnly("androidx.appcompat:appcompat:1.6.0") diff --git a/treeview/src/main/java/io/github/dingyi222666/view/treeview/trees.kt b/treeview/src/main/java/io/github/dingyi222666/view/treeview/trees.kt index 40b46ec..4a943f0 100644 --- a/treeview/src/main/java/io/github/dingyi222666/view/treeview/trees.kt +++ b/treeview/src/main/java/io/github/dingyi222666/view/treeview/trees.kt @@ -219,10 +219,10 @@ class Tree internal constructor() : AbstractTree { if (targetNode.path == "/root" && targetNode != rootNode) { targetNode.path = parentNode.path + "/" + targetNode.name } - Log.d( + /*Log.d( "LogTest", "targetNode.path = ${targetNode.path}, parentNode.path = ${parentNode.path}, targetNode == rootNode = ${targetNode == rootNode}" - ) + )*/ oldNodes.remove(targetNode) targetChildNodeList.add(targetNode) }