diff --git a/build.gradle b/build.gradle index 9e2b923a..fa76e36d 100644 --- a/build.gradle +++ b/build.gradle @@ -2,10 +2,6 @@ allprojects { group = 'dev.aikido' version = '1.0-REPLACE-VERSION' - repositories { - mavenCentral() - } - } subprojects { @@ -19,4 +15,4 @@ subprojects { sourceCompatibility = JavaVersion.VERSION_16 targetCompatibility = JavaVersion.VERSION_16 } -} \ No newline at end of file +} diff --git a/gradle/maven-central-mirror.settings.gradle b/gradle/maven-central-mirror.settings.gradle new file mode 100644 index 00000000..6b6f111d --- /dev/null +++ b/gradle/maven-central-mirror.settings.gradle @@ -0,0 +1,16 @@ +settings.pluginManagement { + repositories { + // Avoid blocked Maven Central locally and 429 errors in CI. + maven { url = uri('https://maven-central.storage-download.googleapis.com/maven2/') } + gradlePluginPortal() + mavenCentral() + } +} + +settings.dependencyResolutionManagement { + repositories { + // Avoid blocked Maven Central locally and 429 errors in CI. + maven { url = uri('https://maven-central.storage-download.googleapis.com/maven2/') } + mavenCentral() + } +} diff --git a/sample-apps/JavaRestletMySQL/build.gradle b/sample-apps/JavaRestletMySQL/build.gradle index 726f266a..dcf3c207 100644 --- a/sample-apps/JavaRestletMySQL/build.gradle +++ b/sample-apps/JavaRestletMySQL/build.gradle @@ -10,9 +10,6 @@ java { targetCompatibility = '17' } -repositories { - mavenCentral() -} dependencies { implementation 'org.restlet:org.restlet:2.6.0' diff --git a/sample-apps/JavaRestletMySQL/settings.gradle b/sample-apps/JavaRestletMySQL/settings.gradle index 0a383dd8..da5e2b91 100644 --- a/sample-apps/JavaRestletMySQL/settings.gradle +++ b/sample-apps/JavaRestletMySQL/settings.gradle @@ -1 +1,3 @@ +apply from: '../../gradle/maven-central-mirror.settings.gradle' + rootProject.name = 'demo' diff --git a/sample-apps/JavalinPostgres/build.gradle b/sample-apps/JavalinPostgres/build.gradle index a4f3b5d4..bbed1986 100644 --- a/sample-apps/JavalinPostgres/build.gradle +++ b/sample-apps/JavalinPostgres/build.gradle @@ -11,9 +11,6 @@ java { targetCompatibility = '17' } -repositories { - mavenCentral() -} dependencies { implementation files('../../dist/agent_api.jar') diff --git a/sample-apps/JavalinPostgres/settings.gradle b/sample-apps/JavalinPostgres/settings.gradle index 6a78ab92..53ec9069 100644 --- a/sample-apps/JavalinPostgres/settings.gradle +++ b/sample-apps/JavalinPostgres/settings.gradle @@ -1,2 +1,3 @@ -rootProject.name = 'JavalinPostgres' +apply from: '../../gradle/maven-central-mirror.settings.gradle' +rootProject.name = 'JavalinPostgres' diff --git a/sample-apps/KtorPostgresNetty/build.gradle.kts b/sample-apps/KtorPostgresNetty/build.gradle.kts index 8844ef4c..734bf31f 100644 --- a/sample-apps/KtorPostgresNetty/build.gradle.kts +++ b/sample-apps/KtorPostgresNetty/build.gradle.kts @@ -16,9 +16,6 @@ kotlin { jvmToolchain(17) } -repositories { - mavenCentral() -} dependencies { implementation(libs.gson) diff --git a/sample-apps/KtorPostgresNetty/settings.gradle.kts b/sample-apps/KtorPostgresNetty/settings.gradle.kts index a8a16af1..cb2f4c9d 100644 --- a/sample-apps/KtorPostgresNetty/settings.gradle.kts +++ b/sample-apps/KtorPostgresNetty/settings.gradle.kts @@ -1 +1,3 @@ +apply(from = "../../gradle/maven-central-mirror.settings.gradle") + rootProject.name = "ktor-sample" diff --git a/sample-apps/SpringBoot2.7Postgres/build.gradle b/sample-apps/SpringBoot2.7Postgres/build.gradle index 2e8407d3..c09eb0b6 100644 --- a/sample-apps/SpringBoot2.7Postgres/build.gradle +++ b/sample-apps/SpringBoot2.7Postgres/build.gradle @@ -12,9 +12,6 @@ java { group = 'com.example' version = '0.0.1-SNAPSHOT' -repositories { - mavenCentral() -} dependencies { implementation files('../../dist/agent_api.jar') diff --git a/sample-apps/SpringBoot2.7Postgres/settings.gradle b/sample-apps/SpringBoot2.7Postgres/settings.gradle index 0a383dd8..da5e2b91 100644 --- a/sample-apps/SpringBoot2.7Postgres/settings.gradle +++ b/sample-apps/SpringBoot2.7Postgres/settings.gradle @@ -1 +1,3 @@ +apply from: '../../gradle/maven-central-mirror.settings.gradle' + rootProject.name = 'demo' diff --git a/sample-apps/SpringBootHyperSQL/build.gradle b/sample-apps/SpringBootHyperSQL/build.gradle index c3468ecd..6d210f6d 100644 --- a/sample-apps/SpringBootHyperSQL/build.gradle +++ b/sample-apps/SpringBootHyperSQL/build.gradle @@ -12,9 +12,6 @@ java { group = 'com.example' version = '0.0.1-SNAPSHOT' -repositories { - mavenCentral() -} dependencies { implementation files('../../dist/agent_api.jar') diff --git a/sample-apps/SpringBootHyperSQL/settings.gradle b/sample-apps/SpringBootHyperSQL/settings.gradle index 0a383dd8..da5e2b91 100644 --- a/sample-apps/SpringBootHyperSQL/settings.gradle +++ b/sample-apps/SpringBootHyperSQL/settings.gradle @@ -1 +1,3 @@ +apply from: '../../gradle/maven-central-mirror.settings.gradle' + rootProject.name = 'demo' diff --git a/sample-apps/SpringBootMSSQL/build.gradle b/sample-apps/SpringBootMSSQL/build.gradle index 76e76fd9..8d0b8cce 100644 --- a/sample-apps/SpringBootMSSQL/build.gradle +++ b/sample-apps/SpringBootMSSQL/build.gradle @@ -12,9 +12,6 @@ java { targetCompatibility = '17' } -repositories { - mavenCentral() -} dependencies { implementation files('../../dist/agent_api.jar') diff --git a/sample-apps/SpringBootMSSQL/settings.gradle b/sample-apps/SpringBootMSSQL/settings.gradle index 0a383dd8..da5e2b91 100644 --- a/sample-apps/SpringBootMSSQL/settings.gradle +++ b/sample-apps/SpringBootMSSQL/settings.gradle @@ -1 +1,3 @@ +apply from: '../../gradle/maven-central-mirror.settings.gradle' + rootProject.name = 'demo' diff --git a/sample-apps/SpringBootMongo/build.gradle b/sample-apps/SpringBootMongo/build.gradle index f1dddba0..24b3686e 100644 --- a/sample-apps/SpringBootMongo/build.gradle +++ b/sample-apps/SpringBootMongo/build.gradle @@ -12,9 +12,6 @@ java { targetCompatibility = '17' } -repositories { - mavenCentral() -} dependencies { implementation files('../../dist/agent_api.jar') diff --git a/sample-apps/SpringBootMongo/settings.gradle b/sample-apps/SpringBootMongo/settings.gradle index 0a383dd8..da5e2b91 100644 --- a/sample-apps/SpringBootMongo/settings.gradle +++ b/sample-apps/SpringBootMongo/settings.gradle @@ -1 +1,3 @@ +apply from: '../../gradle/maven-central-mirror.settings.gradle' + rootProject.name = 'demo' diff --git a/sample-apps/SpringBootMySQL/build.gradle b/sample-apps/SpringBootMySQL/build.gradle index f74bdab6..b1467090 100644 --- a/sample-apps/SpringBootMySQL/build.gradle +++ b/sample-apps/SpringBootMySQL/build.gradle @@ -12,9 +12,6 @@ java { targetCompatibility = '17' } -repositories { - mavenCentral() -} dependencies { implementation files('../../dist/agent_api.jar') diff --git a/sample-apps/SpringBootMySQL/settings.gradle b/sample-apps/SpringBootMySQL/settings.gradle index 0a383dd8..da5e2b91 100644 --- a/sample-apps/SpringBootMySQL/settings.gradle +++ b/sample-apps/SpringBootMySQL/settings.gradle @@ -1 +1,3 @@ +apply from: '../../gradle/maven-central-mirror.settings.gradle' + rootProject.name = 'demo' diff --git a/sample-apps/SpringBootPostgres/build.gradle b/sample-apps/SpringBootPostgres/build.gradle index 9386ffbb..c3e7a6c5 100644 --- a/sample-apps/SpringBootPostgres/build.gradle +++ b/sample-apps/SpringBootPostgres/build.gradle @@ -12,9 +12,6 @@ java { group = 'com.example' version = '0.0.1-SNAPSHOT' -repositories { - mavenCentral() -} dependencies { implementation files('../../dist/agent_api.jar') diff --git a/sample-apps/SpringBootPostgres/settings.gradle b/sample-apps/SpringBootPostgres/settings.gradle index 0a383dd8..da5e2b91 100644 --- a/sample-apps/SpringBootPostgres/settings.gradle +++ b/sample-apps/SpringBootPostgres/settings.gradle @@ -1 +1,3 @@ +apply from: '../../gradle/maven-central-mirror.settings.gradle' + rootProject.name = 'demo' diff --git a/sample-apps/SpringBootSQLite/build.gradle b/sample-apps/SpringBootSQLite/build.gradle index 6f3f63c0..de280add 100644 --- a/sample-apps/SpringBootSQLite/build.gradle +++ b/sample-apps/SpringBootSQLite/build.gradle @@ -12,9 +12,6 @@ java { targetCompatibility = '17' } -repositories { - mavenCentral() -} dependencies { implementation files('../../dist/agent_api.jar') diff --git a/sample-apps/SpringBootSQLite/settings.gradle b/sample-apps/SpringBootSQLite/settings.gradle index 0a383dd8..da5e2b91 100644 --- a/sample-apps/SpringBootSQLite/settings.gradle +++ b/sample-apps/SpringBootSQLite/settings.gradle @@ -1 +1,3 @@ +apply from: '../../gradle/maven-central-mirror.settings.gradle' + rootProject.name = 'demo' diff --git a/sample-apps/SpringMVCPostgresGroovy/build.gradle b/sample-apps/SpringMVCPostgresGroovy/build.gradle index e8f2130a..e19fe182 100644 --- a/sample-apps/SpringMVCPostgresGroovy/build.gradle +++ b/sample-apps/SpringMVCPostgresGroovy/build.gradle @@ -17,9 +17,6 @@ java { targetCompatibility = '17' } -repositories { - mavenCentral() -} dependencies { implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' diff --git a/sample-apps/SpringMVCPostgresGroovy/settings.gradle b/sample-apps/SpringMVCPostgresGroovy/settings.gradle index 0a383dd8..da5e2b91 100644 --- a/sample-apps/SpringMVCPostgresGroovy/settings.gradle +++ b/sample-apps/SpringMVCPostgresGroovy/settings.gradle @@ -1 +1,3 @@ +apply from: '../../gradle/maven-central-mirror.settings.gradle' + rootProject.name = 'demo' diff --git a/sample-apps/SpringMVCPostgresKotlin/build.gradle b/sample-apps/SpringMVCPostgresKotlin/build.gradle index 06ff605c..818c2d01 100644 --- a/sample-apps/SpringMVCPostgresKotlin/build.gradle +++ b/sample-apps/SpringMVCPostgresKotlin/build.gradle @@ -16,9 +16,6 @@ kotlin { } } -repositories { - mavenCentral() -} dependencies { implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' diff --git a/sample-apps/SpringMVCPostgresKotlin/settings.gradle b/sample-apps/SpringMVCPostgresKotlin/settings.gradle index 0a383dd8..da5e2b91 100644 --- a/sample-apps/SpringMVCPostgresKotlin/settings.gradle +++ b/sample-apps/SpringMVCPostgresKotlin/settings.gradle @@ -1 +1,3 @@ +apply from: '../../gradle/maven-central-mirror.settings.gradle' + rootProject.name = 'demo' diff --git a/sample-apps/SpringWebfluxSampleApp/build.gradle b/sample-apps/SpringWebfluxSampleApp/build.gradle index 5d6485aa..355ee7df 100644 --- a/sample-apps/SpringWebfluxSampleApp/build.gradle +++ b/sample-apps/SpringWebfluxSampleApp/build.gradle @@ -12,9 +12,6 @@ java { targetCompatibility = '17' } -repositories { - mavenCentral() -} dependencies { implementation 'org.springframework.boot:spring-boot-starter-webflux' diff --git a/sample-apps/SpringWebfluxSampleApp/settings.gradle b/sample-apps/SpringWebfluxSampleApp/settings.gradle index 129b850b..07f7953d 100644 --- a/sample-apps/SpringWebfluxSampleApp/settings.gradle +++ b/sample-apps/SpringWebfluxSampleApp/settings.gradle @@ -1 +1,3 @@ +apply from: '../../gradle/maven-central-mirror.settings.gradle' + rootProject.name = 'SpringWebfluxSampleApp' diff --git a/settings.gradle b/settings.gradle index b15843f6..2df14071 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,2 +1,4 @@ +apply from: 'gradle/maven-central-mirror.settings.gradle' + rootProject.name = 'firewall-java' -include 'agent', 'agent_api' \ No newline at end of file +include 'agent', 'agent_api'