Skip to content

Commit

Permalink
Merge 66b280b into 47468c3
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregor Billing committed May 7, 2021
2 parents 47468c3 + 66b280b commit 88309eb
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 26 deletions.
1 change: 1 addition & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: 'tnoodle-ui/coverage/lcov.info'
base-path: 'tnoodle-ui'
1 change: 0 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import proguard.gradle.ProGuardTask
buildscript {
repositories {
mavenCentral()
jcenter()
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ plugins {

repositories {
mavenCentral()
jcenter()
}

dependencies {
implementation("org.bouncycastle:bcprov-jdk15on:1.68")
implementation("org.eclipse.jgit:org.eclipse.jgit:5.11.0.202103091610-r")
}
4 changes: 0 additions & 4 deletions buildSrc/src/main/kotlin/PluginsHack.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import dependencies.Libraries.Buildscript.PROGUARD_GRADLE_ACTUAL
import dependencies.Libraries.Buildscript.WCA_I18N_ACTUAL
import dependencies.Libraries.Buildscript.KOTLINX_ATOMICFU_GRADLE_ACTUAL
import dependencies.Plugins.DEPENDENCY_VERSIONS_ACTUAL
import dependencies.Plugins.GIT_VERSION_TAG_ACTUAL
import dependencies.Plugins.GOOGLE_APPENGINE_ACTUAL
import dependencies.Plugins.KOTLESS_ACTUAL
import dependencies.Plugins.KOTLIN_JVM_ACTUAL
Expand Down Expand Up @@ -43,9 +42,6 @@ inline val PluginDependenciesSpec.GOOGLE_APPENGINE: PluginDependencySpec
inline val PluginDependenciesSpec.DEPENDENCY_VERSIONS: PluginDependencySpec
get() = DEPENDENCY_VERSIONS_ACTUAL

inline val PluginDependenciesSpec.GIT_VERSION_TAG: PluginDependencySpec
get() = GIT_VERSION_TAG_ACTUAL

inline val PluginDependenciesSpec.KOTLESS: PluginDependencySpec
get() = KOTLESS_ACTUAL

Expand Down
6 changes: 0 additions & 6 deletions buildSrc/src/main/kotlin/configurations/Languages.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ object Languages {
fun Project.attachRemoteRepositories() {
repositories {
mavenCentral()
jcenter()
}
}

fun Project.attachRepositories() {
attachLocalRepositories()
attachRemoteRepositories()
}
}
16 changes: 11 additions & 5 deletions buildSrc/src/main/kotlin/configurations/ProjectVersions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package configurations
import org.gradle.api.Project
import org.gradle.api.Task
import org.gradle.api.plugins.ExtraPropertiesExtension
import org.gradle.kotlin.dsl.extra
import org.gradle.kotlin.dsl.invoke
import org.gradle.kotlin.dsl.provideDelegate
import org.eclipse.jgit.api.Git
import org.eclipse.jgit.lib.RepositoryBuilder
import java.io.File

object ProjectVersions {
const val TNOODLE_IMPL_KEY = "TNOODLE_IMPL"
Expand All @@ -16,8 +16,14 @@ object ProjectVersions {
const val TNOODLE_SYMLINK = "TNoodle-Build-latest.jar"

fun Project.gitVersionTag(): String {
val gitVersion: groovy.lang.Closure<String> by extra
return gitVersion()
val repo = RepositoryBuilder()
.setGitDir(File(rootDir, "/.git"))
.readEnvironment()
.build()

val version = repo.findRef("HEAD").objectId.name
val isClean = Git.wrap(repo).status().call().isClean
return version + (if (isClean) "" else ".dirty")
}

fun Task.setTNoodleRelease(ext: ExtraPropertiesExtension, name: String, version: String? = null) {
Expand Down
3 changes: 0 additions & 3 deletions buildSrc/src/main/kotlin/dependencies/Plugins.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ object Plugins {
inline val PluginDependenciesSpec.DEPENDENCY_VERSIONS_ACTUAL: PluginDependencySpec
get() = id("com.github.ben-manes.versions").version(Versions.Plugins.DEPENDENCY_VERSIONS)

inline val PluginDependenciesSpec.GIT_VERSION_TAG_ACTUAL: PluginDependencySpec
get() = id("com.palantir.git-version").version(Versions.Plugins.GIT_VERSION_TAG)

inline val PluginDependenciesSpec.KOTLESS_ACTUAL: PluginDependencySpec
get() = id("io.kotless").version(Versions.Plugins.KOTLESS)

Expand Down
3 changes: 1 addition & 2 deletions buildSrc/src/main/kotlin/dependencies/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,9 @@ object Versions {
val KOTLINX_ATOMICFU_GRADLE = "0.15.2"

object Plugins {
val SHADOW = "6.1.0"
val SHADOW = "7.0.0"
val NODEJS = "3.0.1"
val DEPENDENCY_VERSIONS = "0.38.0"
val GIT_VERSION_TAG = "0.12.3"

val KOTLIN = Versions.KOTLIN

Expand Down
1 change: 0 additions & 1 deletion cloudscrambles/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ attachRemoteRepositories()
plugins {
kotlin("jvm")
war
GIT_VERSION_TAG
KOTLIN_SERIALIZATION
GOOGLE_APPENGINE
//KOTLESS
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-all.zip
3 changes: 1 addition & 2 deletions webscrambles/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ plugins {
kotlin("jvm")
application
SHADOW
GIT_VERSION_TAG
KOTLIN_SERIALIZATION
}

Expand Down Expand Up @@ -78,7 +77,7 @@ tasks.withType<KotlinCompile> {
}

application {
mainClassName = "org.worldcubeassociation.tnoodle.server.webscrambles.WebscramblesServer"
mainClass.set("org.worldcubeassociation.tnoodle.server.webscrambles.WebscramblesServer")
}

tasks.create<JavaExec>("i18nCheck") {
Expand Down

0 comments on commit 88309eb

Please sign in to comment.