This commit is contained in:
robin
2026-03-05 19:45:50 +08:00
parent 491ade1bc3
commit fb8348ef47
39 changed files with 513 additions and 174 deletions

View File

@@ -4,7 +4,7 @@ plugins {
}
android {
namespace 'com.new.ams.httpdns'
namespace 'com.trustapp.ams.httpdns'
compileSdkVersion 34
defaultConfig {
@@ -27,7 +27,7 @@ android {
dependencies {
implementation 'androidx.annotation:annotation:1.8.0'
implementation 'com.new.ams:new-android-httpdns:2.6.7'
implementation 'com.newsdk.ams:new-android-httpdns:1.0.0'
}

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.newsdk.ams</groupId>
<artifactId>new-android-crashdefend</artifactId>
<version>0.0.6</version>
<packaging>jar</packaging>
</project>

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.newsdk.ams</groupId>
<artifactId>new-android-httpdns</artifactId>
<version>1.0.0</version>
<packaging>aar</packaging>
<dependencies>
<dependency>
<groupId>com.newsdk.ams</groupId>
<artifactId>new-android-logger</artifactId>
<version>1.2.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.newsdk.ams</groupId>
<artifactId>new-android-crashdefend</artifactId>
<version>0.0.6</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.newsdk.ams</groupId>
<artifactId>new-android-ipdetector</artifactId>
<version>1.2.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.newsdk.ams</groupId>
<artifactId>new-android-ipdetector</artifactId>
<version>1.2.0</version>
<packaging>aar</packaging>
</project>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.newsdk.ams</groupId>
<artifactId>new-android-logger</artifactId>
<version>1.2.0</version>
<packaging>aar</packaging>
</project>

View File

@@ -8,9 +8,9 @@ pluginManagement {
dependencyResolutionManagement {
repositories {
maven { url uri(new File(rootDir, 'libs/repo')) }
google()
mavenCentral()
maven { url 'https://maven.aliyun.com/nexus/content/repositories/releases/' }
}
}

View File

@@ -1,13 +1,13 @@
package com.TrustAPP.ams.httpdns
package com.trustapp.ams.httpdns
import android.content.Context
import android.util.Log
import androidx.annotation.NonNull
import com.Trust.sdk.android.httpdns.HttpDns
import com.Trust.sdk.android.httpdns.HttpDnsService
import com.Trust.sdk.android.httpdns.InitConfig
import com.Trust.sdk.android.httpdns.RequestIpType
import com.Trust.sdk.android.httpdns.log.HttpDnsLog
import com.newsdk.sdk.android.httpdns.HttpDns
import com.newsdk.sdk.android.httpdns.HttpDnsService
import com.newsdk.sdk.android.httpdns.InitConfig
import com.newsdk.sdk.android.httpdns.RequestIpType
import com.newsdk.sdk.android.httpdns.log.HttpDnsLog
import io.flutter.embedding.engine.plugins.FlutterPlugin
import io.flutter.plugin.common.MethodCall
import io.flutter.plugin.common.MethodChannel
@@ -268,7 +268,7 @@ class TrustAPPHttpDnsPlugin : FlutterPlugin, MethodCallHandler {
try {
desiredIPRankingMap?.let { map ->
if (map.isNotEmpty()) {
val beanClass = Class.forName("com.Trust.sdk.android.httpdns.ranking.IPRankingBean")
val beanClass = Class.forName("com.newsdk.sdk.android.httpdns.ranking.IPRankingBean")
val ctor = beanClass.getConstructor(String::class.java, Int::class.javaPrimitiveType)
val list = ArrayList<Any>()
map.forEach { (host, port) ->