Compare commits
4 Commits
0d8157cabf
...
d2349c9308
| Author | SHA1 | Date | |
|---|---|---|---|
| d2349c9308 | |||
| e0a4ff54de | |||
| 3f5f1c6543 | |||
| ac491761d9 |
132
build.gradle.kts
132
build.gradle.kts
@@ -1,13 +1,16 @@
|
|||||||
|
@file:OptIn(ExperimentalWasmDsl::class)
|
||||||
|
|
||||||
|
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("multiplatform") version "1.6.10"
|
kotlin("multiplatform") version "2.0.21"
|
||||||
`maven-publish`
|
`maven-publish`
|
||||||
signing
|
signing
|
||||||
id("org.jetbrains.dokka") version "1.5.31"
|
id("org.jetbrains.dokka") version "1.5.31"
|
||||||
id("com.adarshr.test-logger") version "3.0.0"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "nl.astraeus"
|
group = "nl.astraeus"
|
||||||
version = "1.0.7-SNAPSHOT"
|
version = "1.0.10"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
@@ -15,23 +18,30 @@ repositories {
|
|||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
jvm()
|
jvm()
|
||||||
js(BOTH) {
|
js(IR) {
|
||||||
browser {
|
browser {
|
||||||
testTask {
|
/* testTask {
|
||||||
useKarma {
|
// work around, browser test is broken atm
|
||||||
useFirefox()
|
enabled = false
|
||||||
//useChrome()
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wasmJs {
|
||||||
|
//moduleName = project.name
|
||||||
|
browser()
|
||||||
|
|
||||||
|
mavenPublication {
|
||||||
|
groupId = group as String
|
||||||
|
pom { name = "${project.name}-wasm-js" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
val commonMain by getting {}
|
val commonMain by getting
|
||||||
val commonTest by getting {
|
val commonTest by getting {
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(kotlin("test-common"))
|
implementation(kotlin("test"))
|
||||||
implementation(kotlin("test-annotations-common"))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
val jvmTest by getting {
|
val jvmTest by getting {
|
||||||
@@ -39,18 +49,11 @@ kotlin {
|
|||||||
implementation(kotlin("test-junit"))
|
implementation(kotlin("test-junit"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
val jsTest by getting {
|
val jsMain by getting
|
||||||
dependencies {
|
val wasmJsMain by getting
|
||||||
implementation(kotlin("test-js"))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
testlogger {
|
|
||||||
showStandardStreams = true
|
|
||||||
}
|
|
||||||
|
|
||||||
extra["PUBLISH_GROUP_ID"] = group
|
extra["PUBLISH_GROUP_ID"] = group
|
||||||
extra["PUBLISH_VERSION"] = version
|
extra["PUBLISH_VERSION"] = version
|
||||||
extra["PUBLISH_ARTIFACT_ID"] = name
|
extra["PUBLISH_ARTIFACT_ID"] = name
|
||||||
@@ -77,25 +80,25 @@ publishing {
|
|||||||
maven {
|
maven {
|
||||||
name = "releases"
|
name = "releases"
|
||||||
// change to point to your repo, e.g. http://my.org/repo
|
// change to point to your repo, e.g. http://my.org/repo
|
||||||
url = uri("https://nexus.astraeus.nl/nexus/content/repositories/releases")
|
setUrl("https://reposilite.astraeus.nl/releases")
|
||||||
credentials {
|
credentials {
|
||||||
val nexusUsername: String by project
|
val reposiliteUsername: String? by project
|
||||||
val nexusPassword: String by project
|
val reposilitePassword: String? by project
|
||||||
|
|
||||||
username = nexusUsername
|
username = reposiliteUsername
|
||||||
password = nexusPassword
|
password = reposilitePassword
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
maven {
|
maven {
|
||||||
name = "snapshots"
|
name = "snapshots"
|
||||||
// change to point to your repo, e.g. http://my.org/repo
|
// change to point to your repo, e.g. http://my.org/repo
|
||||||
url = uri("https://nexus.astraeus.nl/nexus/content/repositories/snapshots")
|
setUrl("https://reposilite.astraeus.nl/snapshots")
|
||||||
credentials {
|
credentials {
|
||||||
val nexusUsername: String by project
|
val reposiliteUsername: String? by project
|
||||||
val nexusPassword: String by project
|
val reposilitePassword: String? by project
|
||||||
|
|
||||||
username = nexusUsername
|
username = reposiliteUsername
|
||||||
password = nexusPassword
|
password = reposilitePassword
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
maven {
|
maven {
|
||||||
@@ -106,6 +109,18 @@ publishing {
|
|||||||
password = ossrhPassword
|
password = ossrhPassword
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
maven {
|
||||||
|
name = "gitea"
|
||||||
|
setUrl("https://gitea.astraeus.nl/api/packages/rnentjes/maven")
|
||||||
|
|
||||||
|
credentials() {
|
||||||
|
val giteaUsername: kotlin.String? by project
|
||||||
|
val giteaPassword: kotlin.String? by project
|
||||||
|
|
||||||
|
username = giteaUsername
|
||||||
|
password = giteaPassword
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Configure all publications
|
// Configure all publications
|
||||||
@@ -142,3 +157,56 @@ publishing {
|
|||||||
signing {
|
signing {
|
||||||
sign(publishing.publications)
|
sign(publishing.publications)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.named<Task>("publishJsPublicationToMavenLocal") {
|
||||||
|
dependsOn(tasks.named<Task>("signJvmPublication"))
|
||||||
|
dependsOn(tasks.named<Task>("signKotlinMultiplatformPublication"))
|
||||||
|
dependsOn(tasks.named<Task>("signWasmJsPublication"))
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.named<Task>("publishJvmPublicationToMavenLocal") {
|
||||||
|
dependsOn(tasks.named<Task>("signJsPublication"))
|
||||||
|
dependsOn(tasks.named<Task>("signKotlinMultiplatformPublication"))
|
||||||
|
dependsOn(tasks.named<Task>("signWasmJsPublication"))
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.named<Task>("publishKotlinMultiplatformPublicationToMavenLocal") {
|
||||||
|
dependsOn(tasks.named<Task>("signJvmPublication"))
|
||||||
|
dependsOn(tasks.named<Task>("signJsPublication"))
|
||||||
|
dependsOn(tasks.named<Task>("signWasmJsPublication"))
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.named<Task>("publishWasmJsPublicationToMavenLocal") {
|
||||||
|
dependsOn(tasks.named<Task>("signKotlinMultiplatformPublication"))
|
||||||
|
dependsOn(tasks.named<Task>("signJvmPublication"))
|
||||||
|
dependsOn(tasks.named<Task>("signJsPublication"))
|
||||||
|
dependsOn(tasks.named<Task>("signWasmJsPublication"))
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.named<Task>("publishJsPublicationToGiteaRepository") {
|
||||||
|
dependsOn(tasks.named<Task>("signKotlinMultiplatformPublication"))
|
||||||
|
dependsOn(tasks.named<Task>("signJvmPublication"))
|
||||||
|
dependsOn(tasks.named<Task>("signJsPublication"))
|
||||||
|
dependsOn(tasks.named<Task>("signWasmJsPublication"))
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.named<Task>("publishJvmPublicationToGiteaRepository") {
|
||||||
|
dependsOn(tasks.named<Task>("signKotlinMultiplatformPublication"))
|
||||||
|
dependsOn(tasks.named<Task>("signJvmPublication"))
|
||||||
|
dependsOn(tasks.named<Task>("signJsPublication"))
|
||||||
|
dependsOn(tasks.named<Task>("signWasmJsPublication"))
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.named<Task>("publishKotlinMultiplatformPublicationToGiteaRepository") {
|
||||||
|
dependsOn(tasks.named<Task>("signKotlinMultiplatformPublication"))
|
||||||
|
dependsOn(tasks.named<Task>("signJvmPublication"))
|
||||||
|
dependsOn(tasks.named<Task>("signJsPublication"))
|
||||||
|
dependsOn(tasks.named<Task>("signWasmJsPublication"))
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.named<Task>("publishWasmJsPublicationToGiteaRepository") {
|
||||||
|
dependsOn(tasks.named<Task>("signKotlinMultiplatformPublication"))
|
||||||
|
dependsOn(tasks.named<Task>("signJvmPublication"))
|
||||||
|
dependsOn(tasks.named<Task>("signJsPublication"))
|
||||||
|
dependsOn(tasks.named<Task>("signWasmJsPublication"))
|
||||||
|
}
|
||||||
|
|||||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,5 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ Include in build.gradle.kts:
|
|||||||
|
|
||||||
val commonMain by getting {
|
val commonMain by getting {
|
||||||
dependencies {
|
dependencies {
|
||||||
api("nl.astraeus:kotlin-css-generator:1.0.2")
|
api("nl.astraeus:kotlin-css-generator:1.0.9")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ package nl.astraeus.css
|
|||||||
|
|
||||||
import nl.astraeus.css.properties.BorderStyle
|
import nl.astraeus.css.properties.BorderStyle
|
||||||
import nl.astraeus.css.properties.Color
|
import nl.astraeus.css.properties.Color
|
||||||
|
import nl.astraeus.css.properties.FontStyle
|
||||||
|
import nl.astraeus.css.properties.FontWeight
|
||||||
import nl.astraeus.css.properties.Measurement
|
import nl.astraeus.css.properties.Measurement
|
||||||
import nl.astraeus.css.properties.em
|
import nl.astraeus.css.properties.em
|
||||||
import nl.astraeus.css.properties.hsla
|
import nl.astraeus.css.properties.hsla
|
||||||
@@ -128,4 +130,28 @@ class Examples {
|
|||||||
combineEqualBlocks = true
|
combineEqualBlocks = true
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun testFontFace() {
|
||||||
|
val css = style {
|
||||||
|
|
||||||
|
select("*") {
|
||||||
|
fontFace {
|
||||||
|
fontFamily("UbuntuCondensed")
|
||||||
|
fontStyle(FontStyle.normal)
|
||||||
|
fontWeight(FontWeight.normal)
|
||||||
|
//fontDisplay("auto")
|
||||||
|
src("fonts/ubuntu.condensed.ttf")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
val cssTxt = css.generateCss(
|
||||||
|
minified = false,
|
||||||
|
sortProperties = true,
|
||||||
|
combineEqualBlocks = true
|
||||||
|
)
|
||||||
|
println(cssTxt)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user