Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
danbrough committed Apr 26, 2023
1 parent 495e7a0 commit 9bd61a8
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 16 deletions.
2 changes: 1 addition & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repositories {
}


val javaLangVersion = 11
val javaLangVersion = 17

java {
toolchain.languageVersion.set(JavaLanguageVersion.of(javaLangVersion))
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/src/main/kotlin/Xtras.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import org.gradle.plugin.use.PluginDependencySpec

object Xtras {
const val projectGroup = "org.danbrough.kotlinxtras"
const val version = "0.0.3-beta16"
const val publishingVersion = "0.0.3-beta16"
const val version = "0.0.3-beta17"
const val publishingVersion = "0.0.3-beta17"
const val repoName = "xtras"
const val javaLangVersion = 11
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ xtras.dir.packages=/usr/local/kotlinxtras/packages
# otherwise everything is included
#Print xtras log statements to stdout as well as the gradle log
xtras.log.stdout=true
sonatypeRepoId=orgdanbrough-1484
sonatypeRepoId=orgdanbrough-1485
bootstrap=false
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\:https://services.gradle.org/distributions/gradle-8.1-rc-3-all.zip
distributionUrl=https\:https://services.gradle.org/distributions/gradle-8.1.1-all.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 2 additions & 0 deletions plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ plugins {
xtras("sonatype")
}



repositories {
mavenCentral()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,23 +170,27 @@ open class BinaryExtension {

const val XTRAS_BINARIES_EXTN_NAME = "xtrasBinaries"


val binaryProperty: Project.(String, String) -> String = { exe, defValue ->
projectProperty("$binaryPropertyPrefix.$exe", defValue)
}

const val binaryPropertyPrefix = "xtras.bin"


class BinaryPlugin : Plugin<Project> {
override fun apply(target: Project) {
target.log("Initializing BinaryPlugin...")
target.extensions.create(XTRAS_BINARIES_EXTN_NAME, BinaryExtension::class.java).apply {

val binaryPropertyPrefix = "xtras.bin"
val binaryProperty: (String, String) -> String = { exe, defValue ->
target.projectProperty("$binaryPropertyPrefix.$exe", defValue)
}

gitBinary = binaryProperty("git", gitBinary)
wgetBinary = binaryProperty("wget", wgetBinary)
goBinary = binaryProperty("go", goBinary)
tarBinary = binaryProperty("tar", tarBinary)
autoreconfBinary = binaryProperty("autoreconf", autoreconfBinary)
makeBinary = binaryProperty("make", makeBinary)
cmakeBinary = binaryProperty("cmake", cmakeBinary)
gitBinary = target.binaryProperty("git", gitBinary)
wgetBinary = target.binaryProperty("wget", wgetBinary)
goBinary = target.binaryProperty("go", goBinary)
tarBinary = target.binaryProperty("tar", tarBinary)
autoreconfBinary = target.binaryProperty("autoreconf", autoreconfBinary)
makeBinary = target.binaryProperty("make", makeBinary)
cmakeBinary = target.binaryProperty("cmake", cmakeBinary)


target.tasks.register("xtrasConfig") {
Expand Down

0 comments on commit 9bd61a8

Please sign in to comment.