Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up MavenCentral publication. Use androidx namespace. #47

Merged
merged 35 commits into from
Jun 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
b203468
chore: introduce example and lib modules
wzieba Jun 13, 2022
dcdf372
refactor: rename lib module to parsely
wzieba Jun 14, 2022
61393b4
fix: restore needed permission for library
wzieba Jun 14, 2022
2ce2818
ci: configure Github Actions basic build
wzieba Jun 13, 2022
a5d869f
ci: remove redundant CI trigger
wzieba Jun 16, 2022
12febcf
chore: bump Gradle Wrapper to 7.4.2
wzieba Jun 13, 2022
49f674f
chore: bump AGP to 7.2.1
wzieba Jun 13, 2022
e4439be
refactor: use Gradle Plugin DSL
wzieba Jun 13, 2022
d672548
refactor: use Plugin DSL in modules
wzieba Jun 14, 2022
803b17f
refactor: move plugins configuration to pluginManagement
wzieba Jun 20, 2022
4df0440
chore: move modules declarations in seperate lines
wzieba Jun 20, 2022
f2c91a0
build: disable automatic component creation
wzieba Jun 15, 2022
914bac9
build: decrease minSdkVersion
wzieba Jun 15, 2022
8062fe0
chore: remove unused dependencies
wzieba Jun 15, 2022
aa9e1f9
feat: add publication configuration
wzieba Jun 15, 2022
5c2b57b
fix: pass build without publication credentials
wzieba Jun 15, 2022
ea64453
feat: validate maven publication on CI
wzieba Jun 15, 2022
f22755e
ci: add secrest env variables
wzieba Jun 15, 2022
fdc1c97
fix: disable javadoc publication
wzieba Jun 15, 2022
abb3f46
feat: add developer data
wzieba Jun 16, 2022
a84e5fe
fix: update repository address
wzieba Jun 16, 2022
ac0a351
ci: add a workflow for publishing library
wzieba Jun 16, 2022
28420c2
ci: rename publish workflow
wzieba Jun 16, 2022
496c53d
refactor: move group and artifact name to publication script
wzieba Jun 21, 2022
b79da07
refactor: reorder gradle exts
wzieba Jun 21, 2022
09ba681
feat: set minSdkVersion of example app to 21
wzieba Jun 21, 2022
56562a1
chore: remove unused code/files
wzieba Jun 16, 2022
57a3d20
build: use androidx dependencies
wzieba Jun 16, 2022
a0a2285
build: bump play services ads to 21.0.0
wzieba Jun 16, 2022
4b0e364
ci: add android lint validation
wzieba Jun 16, 2022
4d5f0b3
fix: set targetSdk to 32 and compileSdk to 32
wzieba Jun 22, 2022
7e0e33a
revert: set minSdk version to 23
wzieba Jun 22, 2022
1ea570b
fix: lint only debug buildtype
wzieba Jun 22, 2022
c79bc56
fix: bump Jackson to 2.13.3
wzieba Jun 17, 2022
1bfceb2
chore: remove now not needed packagingOptions
wzieba Jun 17, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Publish SDK to MavenCentral

on:
release:
types: [ released ]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: gradle
- name: Build library
run: ./gradlew :parsely:assembleDebug
- name: Publish to Maven Central Repository
run: ./gradlew :parsely:publishReleasePublicationToMavenCentralRepository --max-workers 1
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
30 changes: 30 additions & 0 deletions .github/workflows/readme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Assemble project

on:
push:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: gradle
- name: Build library
run: ./gradlew :parsely:assembleDebug
- name: Build example app
run: ./gradlew :example:assembleDebug
- name: Android Lint
run: ./gradlew lintDebug
- name: Validate Maven publication
run: ./gradlew :parsely:publishReleasePublicationToMavenLocal
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
70 changes: 62 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,66 @@
# OS X generated file
.DS_Store
.*.un~
.*.swp

# Built application files
*.apk
*.ap_

# Files for the ART/Dalvik VM
*.dex

# Java class files
*.class

# Generated files
bin/
.metadata
.idea
gen
build
nohup.out
docs
gen/
out/
artifacts/

# Gradle files
.gradle/
build/
*/build/

# Local configuration file (sdk path, etc)
local.properties

# IntelliJ/Android Studio project files
*.iml
*.ipr
*.iws
/.idea/*

# IntelliJ/Android Studio
/.idea/vcs.xml
/.idea/codeStyles/
# Enforce plugins
/.idea/externalDependencies.xml
# Checkstyle configuration
/.idea/checkstyle-idea.xml
/.idea/codeStyleSettings.xml

# IntelliJ/Android Studio exceptions
!/.idea/fileTemplates/
!/.idea/inspectionProfiles/
!/.idea/scopes/
!/.idea/encodings.xml
!/.idea/copyright/

# Log Files
*.log

# Backup Files
*.bak

# Android Studio Navigation editor temp files
.navigation/

# Android Studio captures folder
captures/

# Android Studio backup files
projectFilesBackup/

# Keystore files
*.jks
7 changes: 0 additions & 7 deletions ParselyExample/.gitignore

This file was deleted.

19 changes: 0 additions & 19 deletions ParselyExample/ParselyExample.iml

This file was deleted.

180 changes: 0 additions & 180 deletions ParselyExample/app/app.iml

This file was deleted.

37 changes: 0 additions & 37 deletions ParselyExample/app/build.gradle

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion ParselyExample/app/src/main/java/com/parsely

This file was deleted.

9 changes: 0 additions & 9 deletions ParselyExample/app/src/main/res/menu/main.xml

This file was deleted.

6 changes: 0 additions & 6 deletions ParselyExample/app/src/main/res/menu/menu_main.xml

This file was deleted.

6 changes: 0 additions & 6 deletions ParselyExample/app/src/main/res/values-w820dp/dimens.xml

This file was deleted.

This file was deleted.

25 changes: 0 additions & 25 deletions ParselyExample/build.gradle

This file was deleted.

Binary file removed ParselyExample/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
1 change: 0 additions & 1 deletion ParselyExample/settings.gradle

This file was deleted.

20 changes: 20 additions & 0 deletions example/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
plugins {
id 'com.android.application'
}

android {
compileSdkVersion 32

defaultConfig {
applicationId "com.parsely.example.parselyexample"
minSdkVersion 23
targetSdkVersion 32
versionCode 1
versionName "1.0"
}
}

dependencies {
implementation project(':parsely')
implementation 'androidx.appcompat:appcompat:1.4.2'
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
android:value="ca-app-pub-3940256099942544~3347511713"/>
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar" >
android:theme="@style/AppTheme.NoActionBar"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,6 @@ public void run() {

}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.main, menu);
return true;
}

@Override
protected void onDestroy() {
ParselyTracker.sharedInstance().flushEventQueue();
Expand Down
3 changes: 3 additions & 0 deletions example/src/main/res/values-w820dp/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<resources>
<dimen name="activity_horizontal_margin">64dp</dimen>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,12 @@
<resources>

<string name="app_name">HiParsely</string>
<string name="action_settings">Settings</string>
<string name="parsely">Parsely</string>
<string name="button_track_url">Track URL</string>
<string name="button_track_pid">Track ID</string>
<string name="button_start_engagement">Start Engagement</string>
<string name="button_stop_engagement">Stop Engagement</string>
<string name="button_track_video">Track Video</string>
<string name="button_pause_video">Pause Video</string>
<string name="button_reset_video">Reset Video</string>
<string name="button_flush_event_queue">Flush Event Queue</string>
<string name="button_toggle_connection">Lose Connection</string>

</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,5 @@
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />

</resources>
5 changes: 4 additions & 1 deletion ParselyExample/gradle.properties → gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# org.gradle.parallel=true

android.disableAutomaticComponentCreation=true
android.useAndroidX=true
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Mon Feb 11 11:31:10 EST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
Loading