Remove apollo-plugin Gradle plugin

Replaces the old Gradle plugin with plain Gradle buildscripts.  Also cleans-up
the current Gradle extensions and re-adds detekt, along with JUnit 5 support to
all modules.
This commit is contained in:
Gary Tierney
2018-08-27 00:55:41 +01:00
parent 1f7eb78ddb
commit a53929a9a8
45 changed files with 886 additions and 753 deletions
+16 -4
View File
@@ -1,4 +1,16 @@
plugin {
name = "Apollo Plugin API"
description = "Helpers and API for common plugin usecases"
}
apply plugin: 'org.jetbrains.kotlin.jvm'
apply plugin: 'java'
description = 'Helpers and API for common plugin usecases'
test {
useJUnitPlatform()
}
dependencies {
implementation project(':game')
implementation project(':cache')
implementation project(':net')
implementation project(':util')
testImplementation project(':game:plugin-testing')
}
+12 -6
View File
@@ -1,6 +1,12 @@
plugin {
name = "Area listeners"
description = "Enables plugins to listen on mobs entering, moving inside of, or leaving a rectangular area."
authors = ["Major"]
dependencies = ["api"]
}
apply plugin: 'kotlin'
description = 'Enables plugins to listen on mobs entering, moving inside of, or leaving a rectangular area.'
dependencies {
implementation project(':game')
implementation project(':cache')
implementation project(':net')
implementation project(':util')
implementation project(':game:plugin:api')
testImplementation project(':game:plugin-testing')
}
+10 -6
View File
@@ -1,6 +1,10 @@
plugin {
name = "banking"
authors = [
"Major",
]
}
apply plugin: 'kotlin'
dependencies {
implementation project(':game')
implementation project(':cache')
implementation project(':net')
implementation project(':util')
testImplementation project(':game:plugin-testing')
}
+17 -5
View File
@@ -1,8 +1,21 @@
subprojects { subproj ->
if (subproj.buildFile.exists()) {
apply plugin: 'apollo-plugin'
gradle.projectsEvaluated {
configure(subprojects.findAll { it.buildFile.exists() }) { subproj ->
apply from: "$rootDir/gradle/kotlin.gradle"
sourceSets {
main {
kotlin {
srcDirs += "src"
}
}
test {
kotlin {
srcDirs += "test"
}
}
}
test {
useJUnitPlatform()
}
@@ -14,8 +27,7 @@ subprojects { subproj ->
}
dependencies {
test.useJUnitPlatform()
implementation group: 'com.google.guava', name: 'guava', version: guavaVersion
}
}
}
}
@@ -1,3 +1,10 @@
plugin {
name = "private_messaging"
}
apply plugin: 'kotlin'
dependencies {
implementation project(':game')
implementation project(':cache')
implementation project(':net')
implementation project(':util')
testImplementation project(':game:plugin-testing')
}
+10 -12
View File
@@ -1,12 +1,10 @@
plugin {
name = "chat_commands"
authors = [
"Graham",
"Major",
"lare96",
"cubeee",
]
dependencies = [
"api"
]
}
apply plugin: 'kotlin'
dependencies {
implementation project(':game')
implementation project(':cache')
implementation project(':net')
implementation project(':util')
implementation project(':game:plugin:api')
testImplementation project(':game:plugin-testing')
}
+10 -6
View File
@@ -1,6 +1,10 @@
plugin {
name = "consumables"
authors = [
"Gary Tierney",
]
}
apply plugin: 'kotlin'
dependencies {
implementation project(':game')
implementation project(':cache')
implementation project(':net')
implementation project(':util')
testImplementation project(':game:plugin-testing')
}
-325
View File
@@ -1,325 +0,0 @@
autoCorrect: true
failFast: false
build:
warningThreshold: 5
failThreshold: 10
weights:
complexity: 2
formatting: 1
LongParameterList: 1
comments: 1
processors:
active: true
exclude:
# - 'FunctionCountProcessor'
# - 'PropertyCountProcessor'
# - 'ClassCountProcessor'
# - 'PackageCountProcessor'
# - 'KtFileCountProcessor'
console-reports:
active: true
exclude:
# - 'ProjectStatisticsReport'
# - 'ComplexityReport'
# - 'NotificationReport'
# - 'FindingsReport'
# - 'BuildFailureReport'
output-reports:
active: true
exclude:
# - 'PlainOutputReport'
# - 'XmlOutputReport'
potential-bugs:
active: true
DuplicateCaseInWhenExpression:
active: true
EqualsAlwaysReturnsTrueOrFalse:
active: false
EqualsWithHashCodeExist:
active: true
WrongEqualsTypeParameter:
active: false
ExplicitGarbageCollectionCall:
active: true
UnreachableCode:
active: true
LateinitUsage:
active: false
UnsafeCallOnNullableType:
active: false
UnsafeCast:
active: false
UselessPostfixExpression:
active: false
performance:
active: true
ForEachOnRange:
active: true
SpreadOperator:
active: true
UnnecessaryTemporaryInstantiation:
active: true
exceptions:
active: true
ExceptionRaisedInUnexpectedLocation:
active: false
methodNames: 'toString,hashCode,equals,finalize'
SwallowedException:
active: false
TooGenericExceptionCaught:
active: true
exceptions:
- ArrayIndexOutOfBoundsException
- Error
- Exception
- IllegalMonitorStateException
- IndexOutOfBoundsException
- InterruptedException
- NullPointerException
- RuntimeException
TooGenericExceptionThrown:
active: true
exceptions:
- Throwable
- ThrowError
- ThrowException
- ThrowNullPointerException
- ThrowRuntimeException
- ThrowThrowable
InstanceOfCheckForException:
active: false
IteratorNotThrowingNoSuchElementException:
active: false
PrintExceptionStackTrace:
active: false
RethrowCaughtException:
active: false
ReturnFromFinally:
active: false
ThrowingExceptionFromFinally:
active: false
ThrowingExceptionInMain:
active: false
ThrowingNewInstanceOfSameException:
active: false
empty-blocks:
active: true
EmptyCatchBlock:
active: true
EmptyClassBlock:
active: true
EmptyDefaultConstructor:
active: true
EmptyDoWhileBlock:
active: true
EmptyElseBlock:
active: true
EmptyFinallyBlock:
active: true
EmptyForBlock:
active: true
EmptyFunctionBlock:
active: true
EmptyIfBlock:
active: true
EmptyInitBlock:
active: true
EmptySecondaryConstructor:
active: true
EmptyWhenBlock:
active: true
EmptyWhileBlock:
active: true
complexity:
active: true
LongMethod:
threshold: 20
LongParameterList:
threshold: 5
LargeClass:
threshold: 150
ComplexMethod:
threshold: 10
TooManyFunctions:
threshold: 10
ComplexCondition:
threshold: 3
LabeledExpression:
active: false
StringLiteralDuplication:
active: false
threshold: 2
ignoreAnnotation: true
excludeStringsWithLessThan5Characters: true
ignoreStringsRegex: '$^'
code-smell:
active: true
FeatureEnvy:
threshold: 0.5
weight: 0.45
base: 0.5
formatting:
active: true
useTabs: true
Indentation:
active: false
indentSize: 4
ConsecutiveBlankLines:
active: true
autoCorrect: true
MultipleSpaces:
active: true
autoCorrect: true
SpacingAfterComma:
active: true
autoCorrect: true
SpacingAfterKeyword:
active: true
autoCorrect: true
SpacingAroundColon:
active: true
autoCorrect: true
SpacingAroundCurlyBraces:
active: true
autoCorrect: true
SpacingAroundOperator:
active: true
autoCorrect: true
TrailingSpaces:
active: true
autoCorrect: true
UnusedImports:
active: true
autoCorrect: true
OptionalSemicolon:
active: true
autoCorrect: true
OptionalUnit:
active: true
autoCorrect: true
ExpressionBodySyntax:
active: false
autoCorrect: false
ExpressionBodySyntaxLineBreaks:
active: false
autoCorrect: false
OptionalReturnKeyword:
active: true
autoCorrect: false
style:
active: true
ReturnCount:
active: true
max: 2
NewLineAtEndOfFile:
active: true
OptionalAbstractKeyword:
active: true
OptionalWhenBraces:
active: false
EqualsNullCall:
active: false
ForbiddenComment:
active: true
values: 'TODO:,FIXME:,STOPSHIP:'
ForbiddenImport:
active: false
imports: ''
PackageDeclarationStyle:
active: false
ModifierOrder:
active: true
MagicNumber:
active: true
ignoreNumbers: '-1,0,1,2'
ignoreHashCodeFunction: false
ignorePropertyDeclaration: false
ignoreAnnotation: false
WildcardImport:
active: true
SafeCast:
active: true
MaxLineLength:
active: true
maxLineLength: 120
excludePackageStatements: false
excludeImportStatements: false
PackageNaming:
active: true
packagePattern: '^[a-z]+(\.[a-z][a-z0-9]*)*$'
ClassNaming:
active: true
classPattern: '[A-Z$][a-zA-Z$]*'
EnumNaming:
active: true
enumEntryPattern: '^[A-Z$][a-zA-Z_$]*$'
FunctionNaming:
active: true
functionPattern: '^[a-z$][a-zA-Z$0-9]*$'
FunctionMaxLength:
active: false
maximumFunctionNameLength: 30
FunctionMinLength:
active: false
minimumFunctionNameLength: 3
VariableNaming:
active: true
variablePattern: '^(_)?[a-z$][a-zA-Z$0-9]*$'
ConstantNaming:
active: true
constantPattern: '^([A-Z_]*|serialVersionUID)$'
VariableMaxLength:
active: false
maximumVariableNameLength: 30
VariableMinLength:
active: false
minimumVariableNameLength: 3
ForbiddenClassName:
active: false
forbiddenName: ''
ProtectedMemberInFinalClass:
active: false
UnnecessaryParentheses:
active: false
DataClassContainsFunctions:
active: false
UseDataClass:
active: false
UnnecessaryAbstractClass:
active: false
comments:
active: true
CommentOverPrivateMethod:
active: true
CommentOverPrivateProperty:
active: true
UndocumentedPublicClass:
active: false
searchInNestedClass: true
searchInInnerClass: true
searchInInnerObject: true
searchInInnerInterface: true
UndocumentedPublicFunction:
active: false
# *experimental feature*
# Migration rules can be defined in the same config file or a new one
migration:
active: true
imports:
# your.package.Class: new.package.or.Class
# for example:
# io.gitlab.arturbosch.detekt.api.Rule: io.gitlab.arturbosch.detekt.rule.Rule
+10 -6
View File
@@ -1,6 +1,10 @@
plugin {
name = "training_dummy"
authors = [
"Gary Tierney",
]
}
apply plugin: 'kotlin'
dependencies {
implementation project(':game')
implementation project(':cache')
implementation project(':net')
implementation project(':util')
testImplementation project(':game:plugin-testing')
}
+10 -6
View File
@@ -1,6 +1,10 @@
plugin {
name = "emote_tab"
authors = [
"Gary Tierney",
]
}
apply plugin: 'kotlin'
dependencies {
implementation project(':game')
implementation project(':cache')
implementation project(':net')
implementation project(':util')
testImplementation project(':game:plugin-testing')
}
+13 -10
View File
@@ -1,10 +1,13 @@
plugin {
name = "following"
authors = [
"Gary Tierney",
]
dependencies = [
"entity:walk-to",
"entity:player-action",
]
}
apply plugin: 'kotlin'
dependencies {
implementation project(':game')
implementation project(':cache')
implementation project(':net')
implementation project(':util')
implementation project(':game:plugin:entity:walk-to')
implementation project(':game:plugin:entity:player-action')
testImplementation project(':game:plugin-testing')
}
+10 -6
View File
@@ -1,6 +1,10 @@
plugin {
name = "player_action"
authors = [
"Gary Tierney",
]
}
apply plugin: 'kotlin'
dependencies {
implementation project(':game')
implementation project(':cache')
implementation project(':net')
implementation project(':util')
testImplementation project(':game:plugin-testing')
}
+10 -9
View File
@@ -1,9 +1,10 @@
plugin {
name = "spawning"
authors = [
"Gary Tierney",
]
dependencies = [
"api",
]
}
apply plugin: 'kotlin'
dependencies {
implementation project(':game')
implementation project(':cache')
implementation project(':net')
implementation project(':util')
implementation project(':game:plugin:api')
testImplementation project(':game:plugin-testing')
}
+10 -6
View File
@@ -1,6 +1,10 @@
plugin {
name = "walkto"
authors = [
"Gary Tierney",
]
}
apply plugin: 'kotlin'
dependencies {
implementation project(':game')
implementation project(':cache')
implementation project(':net')
implementation project(':util')
testImplementation project(':game:plugin-testing')
}
+13 -10
View File
@@ -1,10 +1,13 @@
plugin {
name = "al_kharid"
authors = [
"Jesse W",
"Arham 4"
]
dependencies = [
"entity:spawn", "shops"
]
}
apply plugin: 'kotlin'
dependencies {
implementation project(':game')
implementation project(':cache')
implementation project(':net')
implementation project(':util')
implementation project(':game:plugin:entity:spawn')
implementation project(':game:plugin:shops')
testImplementation project(':game:plugin-testing')
}
+13 -10
View File
@@ -1,10 +1,13 @@
plugin {
name = "edgeville"
authors = [
"Jesse W",
"Arham 4"
]
dependencies = [
"entity:spawn", "shops"
]
}
apply plugin: 'kotlin'
dependencies {
implementation project(':game')
implementation project(':cache')
implementation project(':net')
implementation project(':util')
implementation project(':game:plugin:entity:spawn')
implementation project(':game:plugin:shops')
testImplementation project(':game:plugin-testing')
}
+13 -10
View File
@@ -1,10 +1,13 @@
plugin {
name = "falador"
authors = [
"Jesse W",
"Arham 4"
]
dependencies = [
"entity:spawn", "shops"
]
}
apply plugin: 'kotlin'
dependencies {
implementation project(':game')
implementation project(':cache')
implementation project(':net')
implementation project(':util')
implementation project(':game:plugin:entity:spawn')
implementation project(':game:plugin:shops')
testImplementation project(':game:plugin-testing')
}
+13 -10
View File
@@ -1,10 +1,13 @@
plugin {
name = "lumbridge"
authors = [
"Gary Tierney",
"Arham 4"
]
dependencies = [
"entity:spawn", "shops"
]
}
apply plugin: 'kotlin'
dependencies {
implementation project(':game')
implementation project(':cache')
implementation project(':net')
implementation project(':util')
implementation project(':game:plugin:entity:spawn')
implementation project(':game:plugin:shops')
testImplementation project(':game:plugin-testing')
}
@@ -1,9 +1,10 @@
plugin {
name = "tutorial_island_npc_spawns"
authors = [
"Jesse W",
]
dependencies = [
"entity:spawn",
]
}
apply plugin: 'kotlin'
dependencies {
implementation project(':game')
implementation project(':cache')
implementation project(':net')
implementation project(':util')
implementation project(':game:plugin:entity:spawn')
testImplementation project(':game:plugin-testing')
}
+11 -11
View File
@@ -1,11 +1,11 @@
plugin {
name = "varrock"
authors = [
"Jesse W",
"Major",
"tlf30",
]
dependencies = [
"entity:spawn", "shops"
]
}
apply plugin: 'kotlin'
dependencies {
implementation project(':game')
implementation project(':cache')
implementation project(':net')
implementation project(':util')
implementation project(':game:plugin:entity:spawn')
implementation project(':game:plugin:shops')
testImplementation project(':game:plugin-testing')
}
+10 -3
View File
@@ -1,3 +1,10 @@
plugin {
name = "logout"
}
apply plugin: 'kotlin'
dependencies {
implementation project(':game')
implementation project(':cache')
implementation project(':net')
implementation project(':util')
testImplementation project(':game:plugin-testing')
}
+10 -8
View File
@@ -1,8 +1,10 @@
plugin {
name = "door"
dependencies = ["api"]
authors = [
"Shiver",
"Arin"
]
}
apply plugin: 'kotlin'
dependencies {
implementation project(':game')
implementation project(':cache')
implementation project(':net')
implementation project(':util')
implementation project(':game:plugin:api')
testImplementation project(':game:plugin-testing')
}
+10 -3
View File
@@ -1,3 +1,10 @@
plugin {
name = "run"
}
apply plugin: 'kotlin'
dependencies {
implementation project(':game')
implementation project(':cache')
implementation project(':net')
implementation project(':util')
testImplementation project(':game:plugin-testing')
}
+9 -10
View File
@@ -1,11 +1,10 @@
plugin {
name = "shops"
authors = [
"Stuart",
"Major",
"tlf30"
]
dependencies = [
"api",
]
apply plugin: 'kotlin'
dependencies {
implementation project(':game')
implementation project(':cache')
implementation project(':net')
implementation project(':util')
implementation project(':game:plugin:api')
testImplementation project(':game:plugin-testing')
}
+12 -11
View File
@@ -1,12 +1,13 @@
plugin {
name = "fishing_skill"
authors = [
"Linux",
"Major",
"tlf30"
]
dependencies = [
"api",
"entity:spawn",
]
apply plugin: 'kotlin'
dependencies {
implementation project(':game')
implementation project(':cache')
implementation project(':net')
implementation project(':util')
implementation project(':game:plugin:api')
implementation project(':game:plugin:entity:spawn')
testImplementation project(':game:plugin-testing')
}
+8 -8
View File
@@ -1,10 +1,10 @@
plugin {
name = "herblore_skill"
authors = [
"Chivvon",
"Chris Fletcher",
"Major"
]
apply plugin: 'kotlin'
dependencies = ["api"]
dependencies {
implementation project(':game')
implementation project(':cache')
implementation project(':net')
implementation project(':util')
implementation project(':game:plugin:api')
testImplementation project(':game:plugin-testing')
}
+9 -13
View File
@@ -1,14 +1,10 @@
plugin {
name = "mining-skill"
authors = [
"Graham",
"Mikey`",
"Major",
"WH:II:DOW",
"Requa",
"Clifton",
"tlf30"
]
apply plugin: 'kotlin'
dependencies = ["api"]
}
dependencies {
implementation project(':game')
implementation project(':cache')
implementation project(':net')
implementation project(':util')
implementation project(':game:plugin:api')
testImplementation project(':game:plugin-testing')
}
+9 -10
View File
@@ -1,11 +1,10 @@
plugin {
name = "prayer_skill"
authors = [
"Major",
"010253",
"tlf30"
]
dependencies = [
"api"
]
apply plugin: 'kotlin'
dependencies {
implementation project(':game')
implementation project(':cache')
implementation project(':net')
implementation project(':util')
implementation project(':game:plugin:api')
testImplementation project(':game:plugin-testing')
}
+9 -11
View File
@@ -1,12 +1,10 @@
plugin {
name = "runecrafting-skill"
authors = [
"Major",
"BugCrusher",
"tlf30"
]
apply plugin: 'kotlin'
dependencies = [
"api"
]
}
dependencies {
implementation project(':game')
implementation project(':cache')
implementation project(':net')
implementation project(':util')
implementation project(':game:plugin:api')
testImplementation project(':game:plugin-testing')
}
+10 -7
View File
@@ -1,7 +1,10 @@
plugin {
name = "woodcutting_skill"
authors = [
"tlf30"
]
dependencies = ["api"]
}
apply plugin: 'kotlin'
dependencies {
implementation project(':game')
implementation project(':cache')
implementation project(':net')
implementation project(':util')
implementation project(':game:plugin:api')
testImplementation project(':game:plugin-testing')
}