Skip to content

Commit

Permalink
1.11.1 (#24)
Browse files Browse the repository at this point in the history
* Get rid of unnecessary kotest refs
* Protect reading map delegates from missing the element
* Update jars
* Display current enrolled class.
* Check answers on focus loss
* Update kotlin to 1.4.32
* Sort username on class summary page
* Fix exception when AGENT_CONFIG is not installed
* Update node and js versions
* Fix name collision problem
  • Loading branch information
pambrose authored Apr 28, 2021
1 parent 6c3cb67 commit f7e7c4b
Show file tree
Hide file tree
Showing 65 changed files with 847 additions and 748 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
gradlew binary
gradlew.bat binary
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ cypress/examples
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ services:
- postgresql

env:
- NODE_VERSION="14.15.1"
- NODE_VERSION="14.16.1"

addons:
apt:
Expand Down Expand Up @@ -38,7 +38,7 @@ before_script:

script:
- ./gradlew check #jacocoTestReport
- cd readingbat-core; ../gradlew run --args="-config=src/test/resources/application-test.conf" &
- cd readingbat-core; ../gradlew run --args="-config=src/test/resources/application-travis.conf" &
- sleep 30
- cd /home/travis/build/readingbat/readingbat-core; /home/travis/build/readingbat/readingbat-core/node_modules/.bin/cypress run --record --key 5ee5de19-1e84-4807-a199-5c70fda2fe5d

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ depends:
./gradlew dependencies

upgrade-wrapper:
./gradlew wrapper --gradle-version=6.8.1 --distribution-type=bin
./gradlew wrapper --gradle-version=6.8.3 --distribution-type=bin
66 changes: 39 additions & 27 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@ plugins {
id 'java'
id 'application'
id 'maven' // Required for jitpack.io to do a ./gradlew install
id 'org.jetbrains.kotlin.jvm' version '1.4.30' apply false
id 'org.jetbrains.kotlin.plugin.serialization' version '1.4.30' apply false
id "com.github.ben-manes.versions" version '0.36.0' apply false
id 'org.jetbrains.kotlin.jvm' version '1.4.32' apply false
id 'org.jetbrains.kotlin.plugin.serialization' version '1.4.32' apply false
id "com.github.ben-manes.versions" version '0.38.0' apply false
id 'com.github.johnrengelman.shadow' version '6.1.0' apply false
id 'com.github.gmazzo.buildconfig' version '2.0.2' apply false
id "org.flywaydb.flyway" version "7.5.2"
id 'com.github.gmazzo.buildconfig' version '3.0.0' apply false
id "org.flywaydb.flyway" version "7.8.1"
}

ext {
libraries = [
kotlin_reflect : "org.jetbrains.kotlin:kotlin-reflect",
kotlin_reflect : "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version",

kotlinx_coroutines_core: "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version",

serialization : "org.jetbrains.kotlinx:kotlinx-serialization-json:$serialization_version",
Expand All @@ -29,16 +30,16 @@ ext {
script_utils_java : "com.github.pambrose.common-utils:script-utils-java:$utils_version",
script_utils_kotlin : "com.github.pambrose.common-utils:script-utils-kotlin:$utils_version",

guava_utils : "com.github.pambrose.common-utils:guava-utils:$utils_version",
//guava_utils : "com.github.pambrose.common-utils:guava-utils:$utils_version",
service_utils : "com.github.pambrose.common-utils:service-utils:$utils_version",
prometheus_utils : "com.github.pambrose.common-utils:prometheus-utils:$utils_version",
exposed_utils : "com.github.pambrose.common-utils:exposed-utils:$utils_version",

prometheus_proxy : "com.github.pambrose:prometheus-proxy:$proxy_version",

simpleclient : "io.prometheus:simpleclient:$prometheus_version",
simple_client : "io.prometheus:simpleclient:$prometheus_version",

scriptengine : "ch.obermuhlner:java-scriptengine:$java_script_version",
script_engine : "ch.obermuhlner:java-scriptengine:$java_script_version",

css : "org.jetbrains:kotlin-css:$css_version",
css_jvm : "org.jetbrains:kotlin-css-jvm:$css_version",
Expand All @@ -57,17 +58,15 @@ ext {
jedis : "redis.clients:jedis:$redis_version",

hikari : "com.zaxxer:HikariCP:$hikari_version",

exposed_core : "org.jetbrains.exposed:exposed-core:$exposed_version",
exposed_jdbc : "org.jetbrains.exposed:exposed-jdbc:$exposed_version",
jodatime : "org.jetbrains.exposed:exposed-jodatime:$exposed_version",

pgjdbc : "com.impossibl.pgjdbc-ng:pgjdbc-ng-all:$pgjdbc_version",
postgres : "org.postgresql:postgresql:$postgres_version",
socket : "com.google.cloud.sql:postgres-socket-factory:$cloud_version",

gson : "com.google.code.gson:gson:$gson_version",
guava : "com.google.guava:guava:$guava_version",
//guava : "com.google.guava:guava:$guava_version",

sendgrid : "com.sendgrid:sendgrid-java:$sendgrid_version",

Expand All @@ -82,14 +81,13 @@ ext {
kotest_runner_junit5 : "io.kotest:kotest-runner-junit5:$kotest_version",
kotest_assertions_core : "io.kotest:kotest-assertions-core:$kotest_version",
kotest_assertions_ktor : "io.kotest:kotest-assertions-ktor:$kotest_version",
kotest_property : "io.kotest:kotest-property:$kotest_version",
]
}

allprojects {
description = 'ReadingBat Core'
group 'com.github.readingbat'
version '1.10.0'
version '1.11.1'

apply plugin: 'application'
apply plugin: 'maven' // required for jitpack.io install
Expand All @@ -104,7 +102,7 @@ allprojects {
maven { url = 'https://kotlin.bintray.com/kotlinx' }
maven { url = 'https://kotlin.bintray.com/kotlin-js-wrappers' }
maven { url = 'https://maven-central.storage-download.googleapis.com/repos/central/data/' }
jcenter()
mavenCentral()
maven { url = 'https://jitpack.io' }
}

Expand All @@ -115,16 +113,16 @@ allprojects {
subprojects {

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"

// These are required for the annotation args below
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:${coroutines_version}"
implementation "io.ktor:ktor-locations:${ktor_version}"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
implementation "io.ktor:ktor-locations:$ktor_version"

implementation "io.github.microutils:kotlin-logging:$logging_version"
implementation "ch.qos.logback:logback-classic:$logback_version"

runtimeOnly "org.jetbrains.kotlin:kotlin-scripting-jsr223"
runtimeOnly "org.jetbrains.kotlin:kotlin-scripting-jsr223:$kotlin_version"
}

shadowJar {
Expand All @@ -141,24 +139,38 @@ subprojects {
from sourceSets.main.allSource
}

artifacts {
archives sourcesJar
}

compileKotlin {
kotlinOptions.jvmTarget = '1.8'
kotlinOptions.freeCompilerArgs += ['-Xuse-experimental=kotlin.time.ExperimentalTime',
kotlinOptions {
useIR = true
//languageVersion = "1.5"
//apiVersion = "1.5"
jvmTarget = '1.8'
freeCompilerArgs += ['-Xuse-experimental=kotlin.time.ExperimentalTime',
'-Xuse-experimental=io.ktor.util.KtorExperimentalAPI',
'-Xuse-experimental=io.ktor.locations.KtorExperimentalLocationsAPI',
'-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi',
'-Xuse-experimental=kotlin.ExperimentalStdlibApi',
'-Xuse-experimental=kotlin.contracts.ExperimentalContracts',
'-XXLanguage:+InlineClasses']
}
}

compileTestKotlin {
kotlinOptions.jvmTarget = '1.8'
kotlinOptions.freeCompilerArgs += ['-Xuse-experimental=kotlin.time.ExperimentalTime',
'-Xuse-experimental=io.ktor.util.KtorExperimentalAPI',
'-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi',
'-Xuse-experimental=kotlin.ExperimentalStdlibApi',
'-XXLanguage:+InlineClasses']
kotlinOptions {
useIR = true
//languageVersion = "1.5"
//apiVersion = "1.5"
jvmTarget = '1.8'
freeCompilerArgs += ['-Xuse-experimental=kotlin.time.ExperimentalTime',
'-Xuse-experimental=io.ktor.util.KtorExperimentalAPI',
'-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi',
'-Xuse-experimental=kotlin.ExperimentalStdlibApi',
'-XXLanguage:+InlineClasses']
}
}

test {
Expand Down
29 changes: 15 additions & 14 deletions docs/notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,27 +51,28 @@ Setup:

## Postgres

* https://hackernoon.com/dont-install-postgres-docker-pull-postgres-bee20e200198
* `mkdir -p $HOME/docker/volumes/postgres`
* `docker run --rm --name pg-docker -e DBMS_PASSWORD=docker -d -p 5432:5432 -v $HOME/docker/volumes/postgres:/var/lib/postgresql/data postgres`
* `psql -h localhost -U postgres -d postgres` use password: docker
* `psql "dbname=readingbat host=localhost port=5432 user=postgres password=docker"`
* [Hikari](https://github.com/brettwooldridge/HikariCP)
* [Postgres on Docker](https://hackernoon.com/dont-install-postgres-docker-pull-postgres-bee20e200198)
* Running postgres on docker:

## Postgres Connection Pools
```shell
mkdir -p $HOME/docker/volumes/postgres
docker run --rm --name pg-docker -e POSTGRES_PASSWORD=docker -d -p 5432:5432 -v $HOME/docker/volumes/postgres:/var/lib/postgresql/data postgres
```

* https://www.thebookofjoel.com/kotlin-ktor-exposed-postgres
* https://github.com/brettwooldridge/HikariCP
* Running postgres locally:
* Running Postgres locally

```
docker run --rm --name pg-docker -e POSTGRES_PASSWORD=docker -d -p 5432:5432 -v $HOME/docker/volumes/postgres:/var/lib/postgresql/data postgres
```shell
psql -h localhost -U postgres -d postgres # use password: docker
psql "dbname=readingbat host=localhost port=5432 user=postgres password=docker"
```

## Exposed

* https://www.thebookofjoel.com/kotlin-ktor-exposed-postgres
* Upsert: https://github.com/JetBrains/Exposed/issues/167
* Upsert: https://medium.com/@OhadShai/first-steps-with-kotlin-exposed-cb361a9bf5ac
* [Exposed](https://github.com/JetBrains/Exposed)
* [Notes on Postgres/Exposed](https://www.thebookofjoel.com/kotlin-ktor-exposed-postgres)
* [Upsert 1](https://github.com/JetBrains/Exposed/issues/167)
* [Upsert 2](https://medium.com/@OhadShai/first-steps-with-kotlin-exposed-cb361a9bf5ac)

## Google Cloud Postgres

Expand Down
34 changes: 17 additions & 17 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@ org.gradle.configureondemand=true
org.gradle.parallel=true
org.gradle.caching=true
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
cloud_version=1.2.0
cloud_version=1.2.2
commons_version=1.9
coroutines_version=1.4.2
css_version=1.0.0-pre.144-kotlin-1.4.21
exposed_version=0.29.1
coroutines_version=1.4.3
css_version=1.0.0-pre.148-kotlin-1.4.30
exposed_version=0.31.1
flexmark_version=0.62.2
github_api_version=1.122
github_api_version=1.128
gson_version=2.8.6
guava_version=30.0-jre
hikari_version=4.0.1
hikari_version=4.0.3
java_script_version=2.0.0
kotest_version=4.4.0
ktor_version=1.5.0
kotest_version=4.4.3
kotlin_version=1.4.32
ktor_version=1.5.3
logback_version=1.2.3
logging_version=2.0.4
pgjdbc_version=0.8.4
postgres_version=42.2.18
logging_version=2.0.6
pgjdbc_version=0.8.7
postgres_version=42.2.20
prometheus_version=0.10.0
proxy_version=1.8.8
redis_version=3.5.1
serialization_version=1.0.1
sendgrid_version=4.7.1
utils_version=4aa1b9d
proxy_version=6d00199
redis_version=3.6.0
serialization_version=1.1.0
sendgrid_version=4.7.2
utils_version=1.8.1
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit f7e7c4b

Please sign in to comment.