-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
168 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,35 @@ | ||
apply plugin: 'com.android.library' | ||
plugins { | ||
id 'com.android.library' | ||
id 'maven-publish' | ||
} | ||
|
||
ext { | ||
PUBLISH_GROUP_ID = 'com.github.woxthebox' | ||
PUBLISH_VERSION = '1.7.3' | ||
PUBLISH_ARTIFACT_ID = 'draglistview' | ||
PUBLISH_DESCRIPTION = 'Drag and drop to re-order items in a list, grid or board.' | ||
PUBLISH_URL = 'https://github.com/woxthebox/DragListView' | ||
PUBLISH_LICENSE_NAME = 'The Apache Software License, Version 2.0' | ||
PUBLISH_LICENSE_URL = | ||
'https://github.com/elye/loaderviewlibrary/blob/master/LICENSE' | ||
PUBLISH_DEVELOPER_ID = 'woxthebox' | ||
PUBLISH_DEVELOPER_NAME = 'Magnus Woxblom' | ||
PUBLISH_DEVELOPER_EMAIL = '[email protected]' | ||
PUBLISH_SCM_CONNECTION = | ||
'scm:[email protected]:woxthebox/DragListView.git' | ||
PUBLISH_SCM_DEVELOPER_CONNECTION = | ||
'scm:[email protected]:woxthebox/DragListView.git' | ||
PUBLISH_SCM_URL = | ||
'scm:[email protected]:woxthebox/DragListView.git' | ||
} | ||
apply from: "${rootProject.projectDir}/scripts/publish-module.gradle" | ||
|
||
android { | ||
compileSdkVersion 29 | ||
buildToolsVersion '28.0.3' | ||
compileSdkVersion 33 | ||
|
||
defaultConfig { | ||
minSdkVersion 14 | ||
targetSdkVersion 29 | ||
versionCode 1 | ||
versionName "1.0" | ||
targetSdkVersion 33 | ||
} | ||
buildTypes { | ||
release { | ||
|
@@ -21,15 +42,14 @@ android { | |
includeAndroidResources = true | ||
} | ||
} | ||
namespace 'com.woxthebox.draglistview' | ||
} | ||
|
||
dependencies { | ||
implementation fileTree(dir: 'libs', include: ['*.jar']) | ||
implementation 'androidx.recyclerview:recyclerview:1.1.0' | ||
implementation 'androidx.recyclerview:recyclerview:1.3.0' | ||
testImplementation 'org.robolectric:robolectric:3.3.2' | ||
testImplementation 'org.mockito:mockito-core:2.7.22' | ||
testImplementation 'junit:junit:4.12' | ||
testImplementation 'com.squareup.assertj:assertj-android:1.0.0' | ||
} | ||
|
||
apply from: 'maven-publish.gradle' |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
// Run ./gradlew publishReleasePublicationToSonatypeRepository in the terminal to upload | ||
apply plugin: 'maven-publish' | ||
apply plugin: 'signing' | ||
|
||
task androidSourcesJar(type: Jar) { | ||
archiveClassifier.set('sources') | ||
if (project.plugins.findPlugin("com.android.library")) { | ||
from android.sourceSets.main.java.srcDirs | ||
} else { | ||
from sourceSets.main.java.srcDirs | ||
} | ||
} | ||
|
||
artifacts { | ||
archives androidSourcesJar | ||
} | ||
|
||
group = PUBLISH_GROUP_ID | ||
version = PUBLISH_VERSION | ||
|
||
afterEvaluate { | ||
publishing { | ||
publications { | ||
release(MavenPublication) { | ||
// The coordinates of the library, being set from variables that | ||
// we'll set up later | ||
groupId PUBLISH_GROUP_ID | ||
artifactId PUBLISH_ARTIFACT_ID | ||
version PUBLISH_VERSION | ||
|
||
// Two artifacts, the `aar` (or `jar`) and the sources | ||
if (project.plugins.findPlugin("com.android.library")) { | ||
from components.release | ||
} else { | ||
artifact("$buildDir/libs/${project.getName()}-${version}.jar") | ||
} | ||
|
||
artifact androidSourcesJar | ||
|
||
// Mostly self-explanatory metadata | ||
pom { | ||
name = PUBLISH_ARTIFACT_ID | ||
description = PUBLISH_DESCRIPTION | ||
url = PUBLISH_URL | ||
licenses { | ||
license { | ||
name = PUBLISH_LICENSE_NAME | ||
url = PUBLISH_LICENSE_URL | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = PUBLISH_DEVELOPER_ID | ||
name = PUBLISH_DEVELOPER_NAME | ||
email = PUBLISH_DEVELOPER_EMAIL | ||
} | ||
} | ||
|
||
// Version control info - if you're using GitHub, follow the | ||
// format as seen here | ||
scm { | ||
connection = PUBLISH_SCM_CONNECTION | ||
developerConnection = PUBLISH_SCM_DEVELOPER_CONNECTION | ||
url = PUBLISH_SCM_URL | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
ext["signing.keyId"] = rootProject.ext["signing.keyId"] | ||
ext["signing.password"] = rootProject.ext["signing.password"] | ||
ext["signing.secretKeyRingFile"] = rootProject.ext["signing.secretKeyRingFile"] | ||
|
||
signing { | ||
sign publishing.publications | ||
} |
Oops, something went wrong.