Skip to content

Commit 93c7abf

Browse files
authored
Merge pull request #36 from ScottPierce/scott/Kotlin_1_6
Kotlin 1.6.10
2 parents c8c9b3a + cfce38c commit 93c7abf

File tree

54 files changed

+3399
-489
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+3399
-489
lines changed

.circleci/config.yml

Lines changed: 5 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,24 @@
11
job_config: &job_config
22
working_directory: ~/workspace
33
docker:
4-
- image: circleci/openjdk:8u212-jdk-stretch
4+
- image: cimg/openjdk:11.0-browsers
55

66
version: 2.1
7+
orbs:
8+
browser-tools: circleci/browser-tools@1.1
79
jobs:
810
code style:
911
<<: *job_config
1012
steps:
1113
- checkout
1214

13-
- add_ssh_keys:
14-
fingerprints:
15-
- b8:e3:f1:7e:67:7d:04:92:2f:be:8b:e4:93:b6:79:1d
16-
17-
- run:
18-
name: Configure GIT
19-
command: |
20-
git config user.email "circleci@circleci.com"
21-
git config user.name "CircleCI"
22-
git push --set-upstream origin ${CIRCLE_BRANCH}
23-
2415
- restore_cache:
2516
keys:
2617
- codestyle-{{ checksum "buildSrc/src/main/kotlin/Deps.kt" }}
2718

2819
- run:
2920
name: Perform code style check
30-
command: ./gradlew ktlintFormat
31-
32-
- run:
33-
name: Commit code style changes
34-
command: scripts/git-commit-if-changes.sh "code style"
21+
command: ./gradlew ktlint
3522

3623
- save_cache:
3724
paths:
@@ -59,6 +46,7 @@ jobs:
5946
unit test:
6047
<<: *job_config
6148
steps:
49+
- browser-tools/install-browser-tools
6250
- checkout
6351

6452
- restore_cache:
@@ -86,10 +74,6 @@ jobs:
8674
steps:
8775
- checkout
8876

89-
- add_ssh_keys:
90-
fingerprints:
91-
- b8:e3:f1:7e:67:7d:04:92:2f:be:8b:e4:93:b6:79:1d
92-
9377
- restore_cache:
9478
keys:
9579
- upload-{{ checksum "buildSrc/src/main/kotlin/Deps.kt" }}
@@ -118,27 +102,6 @@ jobs:
118102
name: Upload kotlin-html-ktor to Bintray and Publish
119103
command: ./gradlew :kotlin-html-ktor:bintrayUpload
120104

121-
- run:
122-
name: Checkout Master
123-
command: git checkout master
124-
125-
- run:
126-
name: Configure GIT
127-
command: |
128-
git config user.email "circleci@circleci.com"
129-
git config user.name "CircleCI"
130-
git fetch origin
131-
git pull
132-
git push --set-upstream origin master
133-
134-
- run:
135-
name: Update version in documentation
136-
command: ./gradlew updateVersionInDocumentation
137-
138-
- run:
139-
name: Commit documentation changes
140-
command: scripts/git-commit-if-changes.sh "version update for release"
141-
142105
- save_cache:
143106
paths:
144107
- ~/.gradle

.github/workflows/build.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Build
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
code-style:
8+
name: Code Style
9+
runs-on: ubuntu-latest
10+
container:
11+
image: openjdk:11-slim
12+
13+
permissions:
14+
contents: write
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v2
19+
20+
- name: Kotlin Code Style
21+
run: ./gradlew ktlint
22+
23+
build:
24+
name: Build
25+
runs-on: ubuntu-latest
26+
container:
27+
image: openjdk:17-slim
28+
29+
steps:
30+
- name: Checkout code
31+
uses: actions/checkout@v2
32+
33+
- name: Build
34+
run: ./gradlew :kotlin-html-writer:assemble :kotlin-html-ktor:assemble --stacktrace
35+
36+
test:
37+
name: Test
38+
runs-on: ubuntu-latest
39+
container:
40+
image: markhobson/maven-chrome:jdk-17
41+
42+
steps:
43+
- name: Checkout code
44+
uses: actions/checkout@v2
45+
46+
- name: Test
47+
run: ./gradlew :kotlin-html-writer:jvmTest :kotlin-html-writer:jvmCodeCoverageReport --stacktrace

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ out/
88

99
/.idea/*
1010
!/.idea/codeStyles
11+
local.properties

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 0.8.0
4+
* Deploy to maven central
5+
* Update to Kotlin 1.6.10
6+
37
## 0.7.0
48
* `styleBuilder` is renamed to `insertStyleBuilder`.
59

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
[![CircleCI](https://circleci.com/gh/ScottPierce/kotlin-html/tree/master.svg?style=svg)](https://circleci.com/gh/ScottPierce/kotlin-html/tree/master)
2-
[![jcenter](https://api.bintray.com/packages/scottpierce/maven/kotlin-html/images/download.svg?version=0.7.24)](https://bintray.com/beta/#/scottpierce/maven/kotlin-html/0.7.24?tab=overview)
32
[![Kotlin](https://img.shields.io/badge/Kotlin-1.3.70-green.svg)](https://kotlinlang.org/)
43
[![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-green.svg?style=flat)](https://www.apache.org/licenses/LICENSE-2.0)
54
<!---

benchmark/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id("org.jetbrains.kotlin.multiplatform")
2+
kotlin("multiplatform")
33
}
44

55
kotlin {

build.gradle.kts

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
33

44
buildscript {
55
repositories {
6-
jcenter()
7-
maven { url = uri("https://dl.bintray.com/kotlin/kotlin-eap") }
6+
mavenCentral()
87
}
98

109
dependencies {
1110
classpath(Plugins.kotlin)
11+
classpath(Plugins.gradleMavenPublish)
1212
}
1313
}
1414

@@ -31,25 +31,36 @@ allprojects {
3131

3232
subprojects {
3333
repositories {
34-
jcenter()
35-
maven {
36-
url = uri("https://dl.bintray.com/kotlin/kotlinx.html/")
37-
}
38-
maven { url = uri("https://dl.bintray.com/kotlin/kotlin-eap") }
39-
maven {
40-
url = uri("https://kotlin.bintray.com/ktor")
41-
content {
42-
includeGroup("io.ktor")
43-
}
44-
}
34+
mavenCentral()
4535
}
4636

4737
tasks.withType<KotlinCompile> {
4838
kotlinOptions.jvmTarget = "1.8"
39+
}
40+
41+
plugins.withId("maven-publish") {
42+
extensions.getByType<PublishingExtension>().apply {
43+
repositories {
44+
maven {
45+
name = "GitHubPackages"
46+
url = uri("https://maven.pkg.github.com/ScottPierce/kotlin-html")
47+
credentials {
48+
username = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME")
49+
password = project.findProperty("gpr.token") as String? ?: System.getenv("TOKEN")
50+
}
51+
}
52+
}
53+
}
54+
}
4955

50-
kotlinOptions.freeCompilerArgs += listOf(
51-
"-Xuse-experimental=kotlin.tim.ExperimentalTime"
52-
)
56+
plugins.withId("org.jetbrains.kotlin.multiplatform") {
57+
configure<org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension> {
58+
sourceSets.configureEach {
59+
languageSettings.apply {
60+
optIn("kotlin.time.ExperimentalTime")
61+
}
62+
}
63+
}
5364
}
5465
}
5566

buildSrc/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ plugins {
44
}
55

66
repositories {
7-
jcenter()
7+
mavenCentral()
88
}

buildSrc/src/main/kotlin/Bintray.kt

Lines changed: 0 additions & 13 deletions
This file was deleted.

buildSrc/src/main/kotlin/Deps.kt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
object Versions {
2-
const val kotlin = "1.3.72"
3-
const val ktor = "1.3.2"
2+
const val kotlin = "1.7.21"
3+
const val ktor = "1.6.7"
44
}
55

66
object Plugins {
7-
val kotlin = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlin}"
7+
const val kotlin = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlin}"
8+
const val gradleMavenPublish = "com.vanniktech:gradle-maven-publish-plugin:0.19.0"
89
}
910

1011
object Deps {
@@ -38,9 +39,9 @@ class KotlinTestLibs internal constructor() {
3839

3940
class KotlinxDeps internal constructor() {
4041
val coroutines = CoroutineDeps()
41-
val html = "org.jetbrains.kotlinx:kotlinx-html-jvm:0.6.12"
42+
val html = "org.jetbrains.kotlinx:kotlinx-html-jvm:0.7.3"
4243
}
4344

4445
class CoroutineDeps internal constructor() {
45-
val jvm = "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8"
46+
val jvm = "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4"
4647
}

0 commit comments

Comments
 (0)