Skip to content

Commit

Permalink
update: build settings
Browse files Browse the repository at this point in the history
  • Loading branch information
pnvnd committed Apr 30, 2024
1 parent de15b1d commit 71d13af
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 14 deletions.
9 changes: 8 additions & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ flutter {
source '../..'
}

repositories {
mavenCentral()
}

apply plugin: 'android'
apply plugin: 'newrelic'

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.newrelic.agent.android:android-agent:7.3.1'
}
1 change: 1 addition & 0 deletions android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</manifest>
1 change: 1 addition & 0 deletions android/app/src/profile/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</manifest>
32 changes: 21 additions & 11 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
// buildscript {
// ext.kotlin_version = '1.8.0'
// repositories {
// mavenLocal()
// mavenCentral()
// google()
// }

// dependencies {
// classpath 'com.android.tools.build:gradle:8.1.2'
// classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// classpath 'com.newrelic.agent.android:agent-gradle-plugin:7.3.0'
// }
// }

buildscript {
ext.kotlin_version = '1.8.0'
repositories {
mavenLocal()
mavenCentral()
google()
}
repositories {
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:8.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.newrelic.agent.android:agent-gradle-plugin:7.3.0'
}
dependencies {
classpath "com.newrelic.agent.android:agent-gradle-plugin:7.3.1"
}
}

allprojects {
Expand Down
15 changes: 15 additions & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,27 @@ pluginManagement {
mavenCentral()
gradlePluginPortal()
}
resolutionStrategy {
eachPlugin {
if (requested.id.id.startsWith("newrelic")) {
useModule("com.newrelic.agent.android:agent-gradle-plugin:7.3.1")
}
}
}

// optional: define as a community plugin here or in root level build file

// for core Gradle plugins or plugins already available to the build script
plugins {
id("newrelic") version "7.3.1"
}
}

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
id("newrelic") version "7.3.1" apply false
}

include ":app"
3 changes: 1 addition & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ dependencies:
url_launcher: ^6.0.10
english_words: ^4.0.0
provider: ^6.0.0
newrelic_mobile: ^1.0.8

newrelic_mobile: ^1.0.5

dev_dependencies:
flutter_test:
Expand Down

0 comments on commit 71d13af

Please sign in to comment.