Skip to content

Commit 6e1d8cd

Browse files
committed
0.1.5. Refactored dokka and extension logic
1 parent 1a41662 commit 6e1d8cd

File tree

9 files changed

+525
-214
lines changed

9 files changed

+525
-214
lines changed

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ plugins {
77
}
88

99
group = "scientifik"
10-
version = "0.1.4"
10+
version = "0.1.5"
1111

1212
repositories {
1313
gradlePluginPortal()

gradle/wrapper/gradle-wrapper.jar

54.3 KB
Binary file not shown.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-bin.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

gradlew

Lines changed: 188 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradlew.bat

Lines changed: 100 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/kotlin/scientifik/ScientifikExtension.kt

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,35 @@
11
package scientifik
22

33
import org.gradle.api.Project
4+
import org.gradle.kotlin.dsl.apply
45
import org.gradle.kotlin.dsl.create
56
import org.gradle.kotlin.dsl.findByType
67

78
open class ScientifikExtension {
8-
var githubProject: String? = null
9-
var vcs: String? = null
10-
var bintrayRepo: String? = null
11-
var kdoc: Boolean = true
9+
fun Project.withDokka() {
10+
apply(plugin = "org.jetbrains.dokka")
11+
subprojects {
12+
this.scientifik.apply{
13+
withDokka()
14+
}
15+
}
16+
}
17+
18+
fun Project.withSerialization() {
19+
apply(plugin = "kotlinx-serialization")
20+
_serialization = true
21+
//recursively apply to all subprojecs
22+
subprojects{
23+
this.scientifik.apply{
24+
withSerialization()
25+
}
26+
}
27+
}
28+
29+
private var _serialization = false
1230
var serialization = false
31+
32+
1333
var io = false
1434
}
1535

0 commit comments

Comments
 (0)