Skip to content

Commit 23920b1

Browse files
authored
Merge pull request #3 from GitLiveApp/publish_to_central
Publish to central
2 parents 2077152 + bdaf09b commit 23920b1

37 files changed

+125
-127
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ build/
33
nbproject/
44
target/
55
.gradle/
6-
6+
/node_modules
7+
.DS_Store

build.gradle.kts

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import org.apache.tools.ant.taskdefs.condition.Os
2-
3-
group = "app.teamhub"
1+
group = "dev.gitlive"
42
version = "4.1.4"
53

64
plugins {
@@ -78,18 +76,18 @@ tasks {
7876
from(file("$buildDir/classes/kotlin/js/main/${project.name}.js.map"))
7977
into(file("$buildDir/node_module"))
8078
}
81-
79+
80+
val copyReadMe by registering(Copy::class) {
81+
from(file("$buildDir/README.md"))
82+
into(file("$buildDir/node_module"))
83+
}
84+
8285
val publishToNpm by registering(Exec::class) {
8386
doFirst {
8487
mkdir("$buildDir/node_module")
8588
}
86-
dependsOn(copyPackageJson, copyJS, copySourceMap)
89+
dependsOn(copyPackageJson, copyJS, copySourceMap, copyReadMe)
8790
workingDir("$buildDir/node_module")
88-
if(Os.isFamily(Os.FAMILY_WINDOWS)) {
89-
commandLine("cmd", "/c", "npm publish --registry http://localhost:4873 & npm publish --registry https://npm.pkg.github.com/")
90-
} else {
91-
commandLine("npm", "publish", "--registry http://localhost:4873")
92-
commandLine("npm", "publish", "--registry https://npm.pkg.github.com/")
93-
}
91+
commandLine("npm", "publish")
9492
}
9593
}

package.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@teamhubapp/kotlin-diff-utils",
2+
"name": "kotlin-diff-utils",
33
"version": "4.1.4",
44
"description": "The DiffUtils library for computing diffs, applying patches, generating side-by-side view in Java.",
55
"main": "kotlin-diff-utils.js",
@@ -8,22 +8,21 @@
88
},
99
"repository": {
1010
"type": "git",
11-
"url": "git+https://github.com/TeamHubApp/kotlin-diff-utils"
11+
"url": "git+https://github.com/GitLiveApp/kotlin-diff-utils"
1212
},
1313
"keywords": [
14+
"diffs",
1415
"kotlin",
1516
"mutliplatform",
1617
"kotlin-js"
17-
1818
],
19-
"author": "TeamHub",
20-
"license": "Apache 2.0",
19+
"author": "GitLiveApp",
20+
"license": "Apache-2.0",
2121
"bugs": {
22-
"url": "https://github.com/TeamHubApp/kotlin-diff-utils/issues"
22+
"url": "https://github.com/GitLiveApp/kotlin-diff-utils/issues"
2323
},
24-
"homepage": "https://github.com/TeamHubApp/kotlin-diff-utils",
24+
"homepage": "https://github.com/GitLiveApp/kotlin-diff-utils#readme",
2525
"dependencies": {
2626
"kotlin": "1.3.70"
2727
}
2828
}
29-

src/commonMain/kotlin/com/github/difflib/DiffUtils.kt renamed to src/commonMain/kotlin/dev/gitlive/difflib/DiffUtils.kt

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package com.github.difflib
16+
package dev.gitlive.difflib
1717

18-
import com.github.difflib.algorithm.DiffAlgorithmI
19-
import com.github.difflib.algorithm.DiffAlgorithmListener
20-
import com.github.difflib.algorithm.DiffException
21-
import com.github.difflib.algorithm.myers.MyersDiff
22-
import com.github.difflib.patch.AbstractDelta
23-
import com.github.difflib.patch.Patch
24-
import com.github.difflib.patch.PatchFailedException
18+
import dev.gitlive.difflib.algorithm.DiffAlgorithmI
19+
import dev.gitlive.difflib.algorithm.DiffAlgorithmListener
20+
import dev.gitlive.difflib.algorithm.DiffException
21+
import dev.gitlive.difflib.algorithm.myers.MyersDiff
22+
import dev.gitlive.difflib.patch.AbstractDelta
23+
import dev.gitlive.difflib.patch.Patch
24+
import dev.gitlive.difflib.patch.PatchFailedException
2525

2626
internal typealias Predicate<T> = (T) -> Boolean
2727
internal typealias BiPredicate<T,R> = (T, R) -> Boolean
@@ -42,16 +42,16 @@ object DiffUtils {
4242
* @param revised The revised text. Must not be `null`.
4343
* @param progress progress listener
4444
* @return The patch describing the difference between the original and revised sequences. Never `null`.
45-
* @throws com.github.difflib.algorithm.DiffException
45+
* @throws dev.gitlive.difflib.algorithm.DiffException
4646
*/
4747
// @Throws(DiffException::class)
4848
fun <T> diff(original: List<T>, revised: List<T>, progress: DiffAlgorithmListener): Patch<T> {
49-
return DiffUtils.diff(original, revised, MyersDiff(), progress)
49+
return diff(original, revised, MyersDiff(), progress)
5050
}
5151

5252
// @Throws(DiffException::class)
5353
fun <T> diff(original: List<T>, revised: List<T>): Patch<T> {
54-
return DiffUtils.diff(original, revised, MyersDiff(), null)
54+
return diff(original, revised, MyersDiff(), null)
5555
}
5656

5757
/**
@@ -60,7 +60,7 @@ object DiffUtils {
6060
// @Throws(DiffException::class)
6161
fun diff(sourceText: String, targetText: String,
6262
progress: DiffAlgorithmListener): Patch<String> {
63-
return DiffUtils.diff(sourceText.lines(), targetText.lines(), progress)
63+
return diff(sourceText.lines(), targetText.lines(), progress)
6464
}
6565

6666
/**
@@ -77,9 +77,9 @@ object DiffUtils {
7777
fun <T> diff(source: List<T>, target: List<T>,
7878
equalizer: BiPredicate<T, T>?): Patch<T> {
7979
return if (equalizer != null) {
80-
DiffUtils.diff(source, target,
80+
diff(source, target,
8181
MyersDiff(equalizer))
82-
} else DiffUtils.diff(source, target, MyersDiff())
82+
} else diff(source, target, MyersDiff())
8383
}
8484

8585
/**
@@ -129,7 +129,7 @@ object DiffUtils {
129129
for (character in revised) {
130130
revList.add(character.toString())
131131
}
132-
val patch = DiffUtils.diff(origList, revList)
132+
val patch = diff(origList, revList)
133133
for (delta in patch.getDeltas()) {
134134
delta.source.lines = compressLines(delta.source.lines!!, "")
135135
delta.target.lines = compressLines(delta.target.lines!!, "")

src/commonMain/kotlin/com/github/difflib/UnifiedDiffUtils.kt renamed to src/commonMain/kotlin/dev/gitlive/difflib/UnifiedDiffUtils.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package com.github.difflib
16+
package dev.gitlive.difflib
1717

18-
import com.github.difflib.patch.ChangeDelta
19-
import com.github.difflib.patch.Chunk
20-
import com.github.difflib.patch.AbstractDelta
21-
import com.github.difflib.patch.Patch
18+
import dev.gitlive.difflib.patch.ChangeDelta
19+
import dev.gitlive.difflib.patch.Chunk
20+
import dev.gitlive.difflib.patch.AbstractDelta
21+
import dev.gitlive.difflib.patch.Patch
2222

2323
/**
2424
*

src/commonMain/kotlin/com/github/difflib/algorithm/Change.kt renamed to src/commonMain/kotlin/dev/gitlive/difflib/algorithm/Change.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package com.github.difflib.algorithm
16+
package dev.gitlive.difflib.algorithm
1717

18-
import com.github.difflib.patch.DeltaType
18+
import dev.gitlive.difflib.patch.DeltaType
1919

2020
/**
2121
*

src/commonMain/kotlin/com/github/difflib/algorithm/DiffAlgorithmI.kt renamed to src/commonMain/kotlin/dev/gitlive/difflib/algorithm/DiffAlgorithmI.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package com.github.difflib.algorithm
16+
package dev.gitlive.difflib.algorithm
1717

1818
/**
1919
* Interface of a diff algorithm.
@@ -41,7 +41,7 @@ interface DiffAlgorithmI<T> {
4141
* @param target
4242
* @param progress
4343
* @return
44-
* @throws com.github.difflib.algorithm.DiffException
44+
* @throws dev.gitlive.difflib.algorithm.DiffException
4545
*/
4646
// @Throws(DiffException::class)
4747
fun computeDiff(source: Array<T>, target: Array<T>, progress: DiffAlgorithmListener?): List<Change> {

src/commonMain/kotlin/com/github/difflib/algorithm/DiffAlgorithmListener.kt renamed to src/commonMain/kotlin/dev/gitlive/difflib/algorithm/DiffAlgorithmListener.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package com.github.difflib.algorithm
16+
package dev.gitlive.difflib.algorithm
1717

1818
/**
1919
*

src/commonMain/kotlin/com/github/difflib/algorithm/DiffException.kt renamed to src/commonMain/kotlin/dev/gitlive/difflib/algorithm/DiffException.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package com.github.difflib.algorithm
16+
package dev.gitlive.difflib.algorithm
1717

1818
open class DiffException : Exception {
1919

src/commonMain/kotlin/com/github/difflib/algorithm/DifferentiationFailedException.kt renamed to src/commonMain/kotlin/dev/gitlive/difflib/algorithm/DifferentiationFailedException.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package com.github.difflib.algorithm
16+
package dev.gitlive.difflib.algorithm
1717

1818
/**
1919
* Thrown whenever the differencing engine cannot produce the differences between two revisions of ta text.
2020
*
21-
* @see com.github.difflib.algorithm.myers.MyersDiff
21+
* @see dev.gitlive.difflib.algorithm.myers.MyersDiff
2222
*
2323
* @see DiffAlgorithmI
2424
*/

0 commit comments

Comments
 (0)