Skip to content

Commit f1bd1de

Browse files
committed
feat(samples): Update sentry sample
1 parent bbfee21 commit f1bd1de

10 files changed

Lines changed: 30 additions & 39 deletions

File tree

inspector-bukkit/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ plugins {
99
}
1010

1111
bukkit {
12-
version = "1.16.4"
12+
apiVersion = "1.16.4"
1313

1414
meta {
1515
name.set("Inspector")

inspector-bukkit/src/main/kotlin/InspectorPlugin.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class InspectorPlugin : JavaPlugin() {
1414
logger.severe("")
1515
logger.severe("What to do?")
1616
logger.severe(" Please report about it to author of the plugin, that requires Inspector.")
17-
logger.severe(" He must bundle it to the plugin or you can use Inspector v0.6.0.")
17+
logger.severe(" He should bundle it to the plugin.")
1818
logger.severe("")
1919

2020
throw AuthorNagException("Aggrh!!! Throwing an exception is only one possible way to disable plugin in onLoad()")

samples/hello-maven/src/main/java/com/example/myplugin/Myplugin.java renamed to samples/hello-maven/src/main/java/com/example/myplugin/MyPlugin.java

File renamed without changes.

samples/sentry-reporter/build.gradle

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
plugins {
2-
id 'ru.endlesscode.bukkitgradle' version '0.8.2'
3-
id 'com.github.johnrengelman.shadow' version '5.2.0'
2+
id 'ru.endlesscode.bukkitgradle' version '0.9.2'
3+
id 'com.github.johnrengelman.shadow' version '6.1.0'
44
}
55

6-
group = "com.example"
6+
group = "com.example.myplugin"
77
description = "My Bukkit plugin with Sentry Reporter"
88
version = "0.1-SNAPSHOT"
99

1010
// Read more about BukkitGradle: https://github.com/EndlessCodeGroup/BukkitGradle
1111
bukkit {
12-
version = "1.15.1"
12+
apiVersion = "1.16.4"
1313

1414
meta {
15-
name = "MyPlugin"
16-
url = "http://www.example.com"
17-
authors = ["osipxd"]
15+
name.set("MyPlugin")
16+
url.set("http://www.example.com")
17+
authors.set(["osipxd"])
1818
}
1919

20-
run {
20+
server {
2121
core = "spigot"
2222
eula = true
2323
}
@@ -37,13 +37,13 @@ shadowJar {
3737
}
3838
tasks.assemble.dependsOn tasks.shadowJar
3939

40-
ext.inspectorVerson = "0.9"
40+
def inspectorVersion = "0.10.0"
4141

4242
dependencies {
43-
compileOnly(bukkit()) { transitive = false }
44-
implementation("ru.endlesscode.inspector:inspector-bukkit:$inspectorVerson")
45-
implementation("ru.endlesscode.inspector:inspector-sentry-reporter:$inspectorVerson")
46-
implementation("ru.endlesscode.inspector:sentry-bukkit:$inspectorVerson")
43+
compileOnly(spigotApi()) { transitive = false }
44+
implementation("ru.endlesscode.inspector:inspector-bukkit:$inspectorVersion")
45+
implementation("ru.endlesscode.inspector:inspector-sentry-reporter:$inspectorVersion")
46+
implementation("ru.endlesscode.inspector:sentry-bukkit:$inspectorVersion")
4747
}
4848

4949
repositories {
501 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

samples/sentry-reporter/gradlew

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samples/sentry-reporter/gradlew.bat

Lines changed: 7 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rootProject.name = "sentry-reporter"

samples/sentry-reporter/src/main/java/com/example/myplugin/MyPlugin.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import ru.endlesscode.inspector.bukkit.plugin.TrackedPlugin;
44
import ru.endlesscode.inspector.report.Reporter;
55
import ru.endlesscode.inspector.report.SentryReporter;
6-
import ru.endlesscode.inspector.sentry.bukkit.BukkitPluginSentryClientFactory;
6+
import ru.endlesscode.inspector.sentry.bukkit.SentryBukkitIntegration;
77

88
public class MyPlugin extends TrackedPlugin {
99

@@ -13,12 +13,11 @@ public MyPlugin() {
1313

1414
@Override
1515
protected Reporter createReporter() {
16-
String publicKey = "845550f6ac0946c9bae87217906aa8e5";
17-
String projectId = "1331962";
16+
String dsn = "https://845550f6ac0946c9bae87217906aa8e5@o209384.ingest.sentry.io/1331962";
1817

1918
return new SentryReporter.Builder()
20-
.setDataSourceName(publicKey, projectId)
21-
.setClientFactory(new BukkitPluginSentryClientFactory(this))
19+
.setDsn(dsn)
20+
.addIntegration(new SentryBukkitIntegration(this))
2221
.focusOn(this)
2322
.build();
2423
}

0 commit comments

Comments
 (0)