Skip to content

Commit

Permalink
Merge pull request #34 from compscidr/jason/remove-module
Browse files Browse the repository at this point in the history
Removed knet module, moved to root
  • Loading branch information
compscidr authored Oct 18, 2024
2 parents 81f904b + 28b5b2e commit 152d78c
Show file tree
Hide file tree
Showing 90 changed files with 94 additions and 107 deletions.
10 changes: 1 addition & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
pull_request:
types: [ opened, synchronize ]
paths:
- 'knet/**'
- '.github/workflows/test.yml'
- 'build.gradle.kts'
- 'settings.gradle.kts'
Expand All @@ -30,13 +29,6 @@ jobs:
java-version: 17
distribution: temurin

# outputs the host name of the runner to help debug if there are multiple runners with same
# prefix
- name: Debug Hostname and IP
run: |
echo "Runner host: $HOST_NAME"
curl https://api.ipify.org
- name: Lint
run: ./gradlew lintKotlin

Expand All @@ -47,7 +39,7 @@ jobs:
run: ./gradlew assemble

- name: Lib tests
run: ./gradlew test -DexcludeTags="Nightly"
run: ./gradlew test
timeout-minutes: 10

- name: Upload reports to Codecov
Expand Down
95 changes: 93 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,95 @@
plugins {
alias(libs.plugins.jetbrains.kotlin.jvm) apply false
alias(libs.plugins.kotlinter) apply false
id("java-library")
alias(libs.plugins.jetbrains.kotlin.jvm)
alias(libs.plugins.kotlinter)
id("jacoco")
alias(libs.plugins.git.version) // https://stackoverflow.com/a/71212144
alias(libs.plugins.sonatype.maven.central)
alias(libs.plugins.gradleup.nmcp)
}

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

kotlin {
jvmToolchain(17)
}

tasks.jacocoTestReport {
reports {
xml.required = true
html.required = true
}
}

tasks.withType<Test>().configureEach {
useJUnitPlatform()
finalizedBy("jacocoTestReport")
}

jacoco {
toolVersion = "0.8.12"
}

dependencies {
api(libs.slf4j.api)
api(libs.icmp.common)
implementation(libs.packetdumper)
testImplementation(libs.bundles.test)
testRuntimeOnly(libs.junit.jupiter.engine)
testImplementation(libs.logback.classic)
}

version = "0.0.0-SNAPSHOT"
gitVersioning.apply {
refs {
branch(".+") { version = "\${ref}-SNAPSHOT" }
tag("v(?<version>.*)") { version = "\${ref.version}" }
}
}

// see: https://github.com/vanniktech/gradle-maven-publish-plugin/issues/747#issuecomment-2066762725
// and: https://github.com/GradleUp/nmcp
nmcp {
val props = project.properties
publishAllPublications {
username = props["centralPortalToken"] as String? ?: ""
password = props["centralPortalPassword"] as String? ?: ""
// or if you want to publish automatically
publicationType = "AUTOMATIC"
}
}

// see: https://vanniktech.github.io/gradle-maven-publish-plugin/central/#configuring-the-pom
mavenPublishing {
coordinates("com.jasonernst.knet", "knet", version.toString())
pom {
name = "knet"
description = "A kotlin user-space networking library."
inceptionYear = "2024"
url = "https://github.com/compscidr/knet"
licenses {
license {
name = "GPL-3.0"
url = "https://www.gnu.org/licenses/gpl-3.0.en.html"
distribution = "repo"
}
}
developers {
developer {
id = "compscidr"
name = "Jason Ernst"
url = "https://www.jasonernst.com"
}
}
scm {
url = "https://github.com/compscidr/knet"
connection = "scm:git:git://github.com/compscidr/knet.git"
developerConnection = "scm:git:ssh://[email protected]/compscidr/knet.git"
}
}

signAllPublications()
}
95 changes: 0 additions & 95 deletions knet/build.gradle.kts

This file was deleted.

1 change: 0 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ dependencyResolutionManagement {
}
}
rootProject.name = "knet"
include(":knet")
File renamed without changes.

0 comments on commit 152d78c

Please sign in to comment.