build.gradle.kts 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. /*
  2. * Copyright (c) Milan Jurkulák 2024.
  3. * Contact:
  4. * e: mimoccc@gmail.com
  5. * e: mj@mjdev.org
  6. * w: https://mjdev.org
  7. */
  8. @Suppress("DEPRECATION", "JcenterRepositoryObsolete")
  9. repositories {
  10. jcenter()
  11. google()
  12. mavenCentral()
  13. gradlePluginPortal()
  14. maven(url = "https://www.jitpack.io")
  15. maven(url = "https://plugins.gradle.org/m2/")
  16. maven(url = "https://oss.sonatype.org/content/repositories/public")
  17. maven(url = "https://oss.sonatype.org/content/repositories/snapshots")
  18. }
  19. plugins {
  20. `kotlin-dsl`
  21. // id("com.github.ben-manes.versions") version "0.41.0"
  22. // id("nl.littlerobots.version-catalog-update") version "0.8.4"
  23. }
  24. //versionCatalogUpdate {
  25. // // sort the catalog by key (default is true)
  26. // sortByKey = true
  27. // // Referenced that are pinned are not automatically updated.
  28. // // They are also not automatically kept however (use keep for that).
  29. // pin {
  30. // // pins all libraries and plugins using the given versions
  31. // versions = ["my-version-name", "other-version"]
  32. // // pins specific libraries that are in the version catalog
  33. // libraries = [libs.my.library.reference, libs.my.other.library.reference]
  34. // // pins specific plugins that are in the version catalog
  35. // plugins = [libs.plugins.my.plugin, libs.plugins.my.other.plugin]
  36. // // pins all libraries (not plugins) for the given groups
  37. // groups = ["com.somegroup", "com.someothergroup"]
  38. // }
  39. // keep {
  40. // // keep has the same options as pin to keep specific entries
  41. // // note that for versions it will ONLY keep the specified version, not all
  42. // // entries that reference it.
  43. // versions = ["my-version-name", "other-version"]
  44. // libraries = [libs.my.library.reference, libs.my.other.library.reference]
  45. // plugins = [libs.plugins.my.plugin, libs.plugins.my.other.plugin]
  46. // groups = ["com.somegroup", "com.someothergroup"]
  47. //
  48. // // keep versions without any library or plugin reference
  49. // keepUnusedVersions = true
  50. // // keep all libraries that aren't used in the project
  51. // keepUnusedLibraries = true
  52. // // keep all plugins that aren't used in the project
  53. // keepUnusedPlugins = true
  54. // }
  55. //}
  56. //ospackage {
  57. // packageName = 'foo'
  58. // version = '1.2.3'
  59. // release = '1'
  60. // arch = I386
  61. // os = LINUX
  62. //
  63. // installUtils file('scripts/rpm/utils.sh')
  64. // preInstall file('scripts/rpm/preInstall.sh')
  65. // postInstall file('scripts/rpm/postInstall.sh')
  66. // preUninstall 'touch /tmp/myfile'
  67. // postUninstall file('scripts/rpm/postUninstall.sh')
  68. //
  69. // requires('qux')
  70. //
  71. // into '/opt/foo'
  72. //
  73. // from(jar.outputs.files) {
  74. // into 'lib'
  75. // }
  76. // from(configurations.runtime) {
  77. // into 'lib'
  78. // }
  79. // from('lib') {
  80. // into 'lib'
  81. // }
  82. // from('scripts') {
  83. // into 'bin'
  84. // exclude 'database'
  85. // fileMode = 0550
  86. // }
  87. // from('src/main/resources') {
  88. // fileType CONFIG | NOREPLACE
  89. // into 'conf'
  90. // }
  91. // from('home') {
  92. // // Creating directory entries (or not) in the RPM is normally left up to redline-rpm library.
  93. // // Use this to explicitly create an entry -- for setting directory fileMode on system directories.
  94. // createDirectoryEntry = true
  95. // fileMode = 0500
  96. // into 'home'
  97. // }
  98. // from('endorsed') {
  99. // // Will tell redline-rpm not to auto create directories, which
  100. // // is sometimes necessary to avoid rpm directory conflicts
  101. // addParentDirs = false
  102. // into '/usr/share/tomcat/endorsed'
  103. // }
  104. //
  105. //}
  106. //
  107. //buildRpm {
  108. // requires('bar', '2.2', GREATER | EQUAL)
  109. // requires('baz', '1.0.1', LESS)
  110. // link('/etc/init.d/foo’, '/opt/foo/bin/foo.init')
  111. //}
  112. //
  113. //buildDeb {
  114. // requires('bat', '1.0.1')
  115. // link('/etc/init.d/foo', '/opt/foo/bin/foo.upstart')
  116. //}
  117. dependencies {
  118. implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
  119. implementation(gradleApi())
  120. implementation(gradleKotlinDsl())
  121. implementation(kotlin("reflect"))
  122. implementation(libs.gradle.api)
  123. implementation(libs.gradle)
  124. implementation(libs.gradle.kotlin.plugin)
  125. implementation(libs.gradle.detekt.plugin)
  126. implementation(libs.gradle.dokka.plugin)
  127. // implementation(libs.gradle.markdown.plugin)
  128. implementation(libs.gradle.kotlinter)
  129. implementation(libs.jsoup)
  130. implementation(libs.kotlin.stdlib.jdk8)
  131. // implementation(libs.detekt.formatting)
  132. implementation(libs.poet.java)
  133. implementation(libs.poet.kotlin)
  134. implementation(libs.eclipse.jgit)
  135. implementation(libs.okhttp3)
  136. implementation(libs.okhttp3.logging.interceptor)
  137. implementation(libs.moshi.kotlin)
  138. implementation(libs.kotlin.mockito)
  139. implementation(libs.junit)
  140. // implementation(libs.apk.parser)
  141. // implementation(libs.gradle.docker.plugin)
  142. // implementation(libs.korim.jvm)
  143. // implementation(libs.photofilter)
  144. // implementation(libs.dependency.analysis.gradle.plugin)
  145. // implementation(libs.google.api.services.androidpublisher)
  146. // implementation(libs.ini4j)
  147. // dokkaPlugin("org.jetbrains.dokka:android-documentation-plugin:1.9.20")
  148. }
  149. gradlePlugin {
  150. plugins {
  151. register("AppPlugin") {
  152. id = "AppPlugin"
  153. displayName = "AppPlugin"
  154. description = "Common application plugin to handle all stuffs needed."
  155. implementationClass = "org.mjdev.gradle.plugin.AppPlugin"
  156. }
  157. register("LibPlugin") {
  158. id = "LibPlugin"
  159. displayName = "LibPlugin"
  160. description = "Common library plugin to handle all stuffs needed."
  161. implementationClass = "org.mjdev.gradle.plugin.LibPlugin"
  162. }
  163. }
  164. }