Skip to content

Commit

Permalink
Merge pull request #173 from chenenyu/dev
Browse files Browse the repository at this point in the history
1.8.1
  • Loading branch information
chenenyu authored Jun 22, 2022
2 parents d7ea53e + b33cefa commit 17465fe
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 25 deletions.
9 changes: 6 additions & 3 deletions Sample/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:windowSoftInputMode="stateHidden">
android:windowSoftInputMode="stateHidden"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand All @@ -21,7 +22,8 @@
</activity>
<activity
android:name=".SchemeFilterActivity"
android:label="SchemeFilterActivity">
android:label="SchemeFilterActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />

Expand All @@ -44,7 +46,8 @@
android:label="ForResultActivity" />
<activity
android:name=".ImplicitActivity"
android:label="ImplicitActivity">
android:label="ImplicitActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />

Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
buildscript {
ext.kotlin_version = '1.5.31'
ext.kotlin_version = '1.7.0'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.0'
classpath 'com.android.tools.build:gradle:7.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
if (Boolean.valueOf(applyRemotePlugin)) {
classpath "com.chenenyu.router:gradle-plugin:${PLUGIN_VERSION}"
Expand All @@ -25,9 +25,9 @@ task clean(type: Delete) {
}

ext {
compileSdkVersion = 30
compileSdkVersion = 32
minSdkVersion = 16
targetSdkVersion = 30
targetSdkVersion = 32
// compilerLoggable = false
// androidxVersion = "1.1.0"
}
6 changes: 3 additions & 3 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ if (!Boolean.valueOf(applyRemotePlugin)) {
dependencies {
implementation gradleApi()
implementation localGroovy()
implementation 'com.android.tools.build:gradle:4.0.0'
compileOnly 'com.android.tools:common:30.0.0'
compileOnly 'com.android.tools:repository:30.0.0'
implementation 'com.android.tools.build:gradle:7.2.1'
compileOnly 'com.android.tools:common:30.2.1'
compileOnly 'com.android.tools:repository:30.2.1'
}

sourceSets {
Expand Down
6 changes: 3 additions & 3 deletions gradle-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ repositories {
dependencies {
implementation gradleApi()
implementation localGroovy()
compileOnly 'com.android.tools.build:gradle:4.0.0'
compileOnly 'com.android.tools:common:30.0.0'
compileOnly 'com.android.tools:repository:30.0.0'
compileOnly 'com.android.tools.build:gradle:7.2.1'
compileOnly 'com.android.tools:common:30.2.1'
compileOnly 'com.android.tools:repository:30.2.1'
}

ext {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
package com.chenenyu.router

//import groovy.xml.XmlParser // Added in gradle7.0(groovy 3.0.0)
import groovy.xml.XmlUtil
import org.gradle.api.Project

class ManifestTransformer {
static void transform(Project project, File input, File output) {
Node xml = new XmlParser().parse(input)
Node applicationNode = xml.get('application')[0]
applicationNode.appendNode('meta-data', ['android:name': project.name, 'android:value': 'com.chenenyu.router.moduleName'])
def result = XmlUtil.serialize(xml)
output.write(result)
FileWriter fileWriter = new FileWriter(output)
XmlNodePrinter nodePrinter = new XmlNodePrinter(new PrintWriter(fileWriter))
nodePrinter.setPreserveWhitespace(true)
nodePrinter.print(xml)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,6 @@ class RouterPlugin implements Plugin<Project> {
})
}

// if (isApp) {
// def transform = new RouterTransform(project)
// android.registerTransform(transform)
// }

// com.android.Version added in 3.6.0, and com.android.builder.model.Version was deprecated in 3.6.0
String agpVersion
try {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ android.useAndroidX=true
# apply router plugin
applyRemotePlugin=false
# router gradle plugin version
PLUGIN_VERSION=1.8.0
PLUGIN_VERSION=1.8.1
# router library version
ROUTER_VERSION=1.8.0
# compiler library version
Expand Down
12 changes: 10 additions & 2 deletions gradle/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,17 @@ afterEvaluate {
def snapshotsRepoUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl

def _ossrhUsername = ''
def _ossrhPassword = ''
if (project.hasProperty('ossrhUsername')) {
_ossrhUsername = ossrhUsername
}
if (project.hasProperty('ossrhPassword')) {
_ossrhPassword = ossrhPassword
}
credentials {
username = ossrhUsername
password = ossrhPassword
username = _ossrhUsername
password = _ossrhPassword
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Jul 12 18:00:44 CST 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

0 comments on commit 17465fe

Please sign in to comment.