Skip to content

Commit 2cf21c0

Browse files
committed
v3.2.8
1 parent 43908d7 commit 2cf21c0

File tree

7 files changed

+153
-60
lines changed

7 files changed

+153
-60
lines changed

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -161,4 +161,6 @@ gradle-app.setting
161161
### Gradle Patch ###
162162
**/build/
163163

164-
# End of https://www.toptal.com/developers/gitignore/api/java,gradle,intellij,kotlin
164+
# End of https://www.toptal.com/developers/gitignore/api/java,gradle,intellij,kotlin
165+
# Local Netlify folder
166+
.netlify

.netlify/state.json

-3
This file was deleted.

build.gradle.kts

+2-45
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import org.gradle.api.attributes.java.TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE
22
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
3-
import java.net.URL
43

54
plugins {
65
java
7-
kotlin("jvm") version "1.4.21"
6+
kotlin("jvm") version "1.4.30"
87
`maven-publish` // Jitpack
98
id("org.jetbrains.dokka") version "1.4.20"
9+
id("docs")
1010
}
1111

1212
val group = "com.github.kotlin_graphics"
@@ -29,31 +29,6 @@ java.modularity.inferModulePath.set(true)
2929

3030
tasks {
3131

32-
val netlifyBadge by registering {
33-
doLast {
34-
val index = dokkaHtml.get().outputDirectory.get().resolve("kotlin-unsigned" + File.separatorChar + "index.html")
35-
val text = index.readText()
36-
val ofs = text.lastIndexOf("</span>") + 7
37-
val badge = """
38-
<a href="https://www.netlify.com">
39-
<img src="https://www.netlify.com/img/global/badges/netlify-color-accent.svg" alt="Deploys by Netlify" style="vertical-align:middle;margin:10px 10px" />
40-
</a>
41-
""".trimIndent()
42-
index.writeText(text.replaceRange(ofs, ofs, badge))
43-
}
44-
}
45-
46-
dokkaHtml {
47-
dokkaSourceSets.configureEach {
48-
sourceLink {
49-
localDirectory.set(file("src/main/kotlin"))
50-
remoteUrl.set(URL("https://github.com/kotlin-graphics/kotlin-unsigned/tree/master/src/main/kotlin"))
51-
remoteLineSuffix.set("#L")
52-
}
53-
}
54-
finalizedBy(netlifyBadge)
55-
}
56-
5732
withType<KotlinCompile>().all {
5833
kotlinOptions {
5934
jvmTarget = "11"
@@ -62,31 +37,13 @@ tasks {
6237
sourceCompatibility = "11"
6338
}
6439

65-
6640
compileJava { // this is needed because we have a separate compile step in this example with the 'module-info.java' is in 'main/java' and the Kotlin code is in 'main/kotlin'
6741
options.compilerArgs = listOf("--patch-module", "$moduleName=${sourceSets.main.get().output.asPath}")
6842
}
6943

7044
withType<Test> { useJUnitPlatform() }
7145
}
7246

73-
val dokkaJavadocJar by tasks.register<Jar>("dokkaJavadocJar") {
74-
dependsOn(tasks.dokkaJavadoc)
75-
from(tasks.dokkaJavadoc.get().outputDirectory.get())
76-
archiveClassifier.set("javadoc")
77-
}
78-
79-
val dokkaHtmlJar by tasks.register<Jar>("dokkaHtmlJar") {
80-
dependsOn(tasks.dokkaHtml)
81-
from(tasks.dokkaHtml.get().outputDirectory.get())
82-
archiveClassifier.set("html-doc")
83-
}
84-
85-
artifacts {
86-
archives(dokkaJavadocJar)
87-
archives(dokkaHtmlJar)
88-
}
89-
9047
publishing.publications.register("mavenJava", MavenPublication::class) {
9148
from(components["java"])
9249
}

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
org.gradle.jvmargs=-XX:MaxMetaspaceSize=512m
1+
org.gradle.jvmargs=-XX:MaxMetaspaceSize=1g
22
#org.gradle.daemon=false

netlify.toml

+133-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,78 @@
1+
# Settings in the [build] context are global and are applied to all contexts
2+
# unless otherwise overridden by more specific contexts.
3+
[build]
4+
# Directory to change to before starting a build.
5+
# This is where we will look for package.json/.nvmrc/etc.
6+
# If not set, defaults to the root directory.
7+
#base = "project/"
8+
9+
# Directory that contains the deploy-ready HTML files and assets generated by
10+
# the build. This is relative to the base directory if one has been set, or the
11+
# root directory if a base has not been set. This sample publishes the
12+
# directory located at the absolute path "root/project/build-output"
13+
publish = "build/dokka/html"
14+
15+
# Default build command.
16+
command = "./gradlew dokkaHtml"
17+
18+
## Directory with the serverless functions, including background functions,
19+
## to deploy to AWS. This is relative to the base directory if one has been set,
20+
## or the root directory if a base has not been set.
21+
#functions = "functions/"
22+
#
23+
## Production context: all deploys from the Production branch set in your site’s
24+
## deploy contexts will inherit these settings.
25+
#[context.production]
26+
#publish = "output/"
27+
#command = "make publish"
28+
#environment = { ACCESS_TOKEN = "super secret", NODE_VERSION = "14.15.3" }
29+
#
30+
## Deploy Preview context: all deploys generated from a pull/merge request will
31+
## inherit these settings.
32+
#[context.deploy-preview]
33+
#publish = "dist/"
34+
#
35+
## Here is another way to define context specific environment variables.
36+
#[context.deploy-preview.environment]
37+
#ACCESS_TOKEN = "not so secret"
38+
#
39+
## Branch Deploy context: all deploys that are not from a pull/merge request or
40+
## from the Production branch will inherit these settings.
41+
#[context.branch-deploy]
42+
#command = "echo branch"
43+
#[context.branch-deploy.environment]
44+
#NODE_ENV = "development"
45+
#
46+
## Specific branch context: all deploys from this specific branch will inherit
47+
## these settings.
48+
#[context.staging] # “staging” is a branch name
49+
#command = "echo 'staging'"
50+
#base = "staging"
51+
#
52+
## For contexts of branches with special characters, enclose the branch name
53+
## with quotes.
54+
#[context."feat/branch"]
55+
#command = "echo 'special branch'"
56+
#base = "branch"
57+
#
58+
## Redirects and headers are GLOBAL for all builds – they do not get scoped to
59+
## contexts no matter where you define them in the file.
60+
## For context-specific rules, use _headers or _redirects files, which are
61+
## PER-DEPLOY.
62+
#
63+
## A basic redirect rule
64+
#[[redirects]]
65+
#from = "/*"
66+
#to = "/blog/:splat"
67+
#
68+
# A redirect rule with many of the supported properties
69+
#[[redirects]]
70+
#from = "/old-path"
71+
#to = "/new-path"
72+
173
[[redirects]]
2-
from = "/"
3-
to = "/build/dokka/html/kotlin-unsigned"
74+
from = "/"
75+
to = "/kotlin-unsigned"
476
# from = "/index.html"
577
# to = "/build/dokka/html/kotlin-unsigned/index.html"
678
#status = 200
@@ -21,4 +93,62 @@
2193
#from = "/styles/*"
2294
#to = "/build/dokka/html/styles/:splat"
2395
#status = 200
24-
# force = true
96+
# force = true
97+
98+
## The default HTTP status code is 301, but you can define a different one.
99+
#status = 302
100+
#
101+
## By default, redirects won’t be applied if there’s a file with the same
102+
## path as the one defined in the `from` property. Setting `force` to `true`
103+
## will make the redirect rule take precedence over any existing files.
104+
#force = true
105+
#
106+
## Redirect from /old-path?id=123 to /new-path. Each combination of query
107+
## params needs to be defined in a separate [[redirects]] block.
108+
## More information at https://docs.netlify.com/routing/redirects/redirect-options/#query-parameters
109+
#query = {id = ":id"}
110+
#
111+
## Redirect based on browser language and geolocation.
112+
#conditions = {Language = ["en"], Country = ["US"]}
113+
#
114+
## Sign each request with a value defined in an environment variable
115+
#signed = "API_SIGNATURE_TOKEN"
116+
#
117+
## You can also define custom headers within your redirects blocks.
118+
#[redirects.headers]
119+
#X-From = "Netlify"
120+
#X-Api-Key = "some-api-key-string"
121+
#
122+
## Role-based redirects do not have a “to” property.
123+
#[[redirects]]
124+
#from = "/gated-path"
125+
#status = 200
126+
#conditions = {Role = ["admin"]}
127+
#force = true
128+
#
129+
## The following redirect is intended for use with most SPAs that handle
130+
## routing internally.
131+
#[[redirects]]
132+
#from = "/*"
133+
#to = "/index.html"
134+
#status = 200
135+
#
136+
#[[headers]]
137+
## Define which paths this specific [[headers]] block will cover.
138+
#for = "/*"
139+
#
140+
#[headers.values]
141+
#X-Frame-Options = "DENY"
142+
#X-XSS-Protection = "1; mode=block"
143+
#Content-Security-Policy = "frame-ancestors https://www.facebook.com"
144+
#
145+
## Multi-value headers are expressed with multi-line strings.
146+
#cache-control = '''
147+
# max-age=0,
148+
# no-cache,
149+
# no-store,
150+
# must-revalidate'''
151+
#
152+
## Basic-Auth allows you to password protect your whole site.
153+
## This feature may not be available on all plans.
154+
#Basic-Auth = "someuser:somepassword anotheruser:anotherpassword"

settings.gradle.kts

+13-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
rootProject.name = "kotlin-unsigned"
22

3-
//pluginManagement {
4-
// repositories {
5-
// gradlePluginPortal()
6-
// maven("https://maven.pkg.jetbrains.space/kotlin/p/dokka/dev")
7-
// }
8-
//}
3+
pluginManagement {
4+
5+
resolutionStrategy {
6+
eachPlugin {
7+
if(requested.id.id == "docs")
8+
useModule("com.github.elect86:docs:9c008a8b")//.also { println("found") }
9+
}
10+
}
11+
repositories {
12+
gradlePluginPortal()
13+
maven("https://jitpack.io")
14+
}
15+
}

src/main/kotlin/unsigned/unsigned.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ fun Char.toUint() = Uint(toInt())
1818
fun Char.toUlong() = Ulong(toLong())
1919
fun Char.toUshort() = Ushort(toShort())
2020

21-
val version = "3.2.7"
21+
val version = "3.2.8"

0 commit comments

Comments
 (0)