Skip to content

Commit

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

repositories {
mavenCentral()
}

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

dependencies {
implementation 'com.newrelic.agent.android:android-agent:7.3.1'
}
4 changes: 2 additions & 2 deletions android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
the Flutter tool needs it to communicate with the running application
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" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
</manifest>
4 changes: 2 additions & 2 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

<application
android:label="Lifebottle App"
Expand Down
4 changes: 2 additions & 2 deletions android/app/src/profile/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
the Flutter tool needs it to communicate with the running application
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" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
</manifest>
15 changes: 0 additions & 15 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
// 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 {
repositories {
mavenCentral()
Expand Down
15 changes: 0 additions & 15 deletions android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,12 @@ 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"
6 changes: 4 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ import 'package:url_launcher/url_launcher.dart';
import 'dart:io';
import 'package:newrelic_mobile/config.dart';
import 'package:newrelic_mobile/newrelic_mobile.dart';
import 'package:newrelic_mobile/newrelic_navigation_observer.dart';

void main() {
var appToken = "";
if (Platform.isIOS) {
appToken = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-NRMA';
appToken = 'AA5b1b16e53d1fc3f85938dcb232fea7ca9722a45c-NRMA';
} else if (Platform.isAndroid) {
appToken = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-NRMA';
appToken = 'AA6f6fe24afa2b193369bed4c485a6a2ae03a58a29-NRMA';
}

Config config = Config(
Expand Down Expand Up @@ -41,6 +42,7 @@ class MyApp extends StatelessWidget {
return ChangeNotifierProvider(
create: (context) => MyAppState(),
child: MaterialApp(
navigatorObservers: [NewRelicNavigationObserver()],
title: 'Lifebottle App',
theme: ThemeData(
useMaterial3: true,
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies:
url_launcher: ^6.0.10
english_words: ^4.0.0
provider: ^6.0.0
newrelic_mobile: ^1.0.5
newrelic_mobile: ^1.0.8

dev_dependencies:
flutter_test:
Expand Down

0 comments on commit 51df506

Please sign in to comment.