Compare commits

...

3 Commits

Author SHA1 Message Date
Balazs Toldi
5311edc404
Add new icon to README and fastlane 2023-10-20 11:38:20 +02:00
Balazs Toldi
d8dc8c39b2
Update README and fastlane description 2023-10-20 11:35:05 +02:00
Balazs Toldi
c43ced8b00
Merge Reproducible Builds
This commit makes release builds reproducible. This will help folks update the app from F-Droid when it's released there.
2023-10-20 09:31:53 +02:00
8 changed files with 186 additions and 35 deletions

View File

@ -2,6 +2,7 @@ steps:
build:
image: alvrme/alpine-android:android-33-jdk11
commands:
- apk add --no-cache python3
- ./gradlew :app:assembleRelease
when:
path: [ app/**, build.gradle ]

View File

@ -8,6 +8,7 @@ steps:
build:
image: alvrme/alpine-android:android-33-jdk11
commands:
- apk add --no-cache python3
- ./gradlew :app:assembleNightly
sign:
image: alvrme/alpine-android:android-33-jdk11

View File

@ -1,5 +1,5 @@
<h1 align="center">
Eternity (formerly Infinity for Lemmy)
Eternity for Lemmy
</h1>
<div align="center">
@ -36,24 +36,62 @@ A Lemmy client for Android written in Java. It's a fork of the [Infinity for Red
---
## Action Items for Eternity
## Features
Eternity is currently in the early stages of development. Expect many unfinished features and bugs!
- [x] Implementation of basic post browsing feature
- [x] Support for multiple account handling
- [x] Functionality for post upvotes/downvotes
- [x] Functionality to browse comments
- [x] Capability for creating a new post
- [x] Ability to create comments
- [x] Edit/Delete posts and comments
- [x] Basic inbox
- [ ] Elimination of code/string references specific to Reddit
- [x] Incorporation of private messaging feature
- [x] Feature for saving posts/comments
- [x] Resolving links
- [ ] Account editing function
- [ ] Multi community view?
### Browsing Lemmy
- Explore various feeds (Subscribed/Local/All) and communities
- Subscribe or unsubscribe from specific communities, with the option to block
- Discover communities federated with the current instance
- Favorite a community for quick access
- Manage your subscriptions and blocked communities
### Content Engagement
- Engage with content by voting, saving, sharing, and creating posts or comments
- Enjoy endless scrolling through feeds and posts
- Tailor the view settings for posts (card,compact, gallery)
- Set default preferences for post and comment sorting
- Stay updated with notifications for replies
### Account Management
- Sign in to multiple accounts or instances, and effortlessly switch between them
- Use the inbox features to view replies, mentions, and private messages
- Access your profile to view your posts, comments, and saved content
### Customization
- Choose between various theme options including Light, Dark, OLED
- Support Material You theming
- Explore user-created themes
- Customize font settings
- Optional bottom navigation bar
- Discover a plethora of other customization features
<img
src="https://codeberg.org/Bazsalanszky/Eternity/raw/branch/master/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png"
alt="Screenshot 1"
height="200" >
<img
src="https://codeberg.org/Bazsalanszky/Eternity/raw/branch/master/fastlane/metadata/android/en-US/images/phoneScreenshots/2.png"
alt="Screenshot 2"
height="200" >
<img
src="https://codeberg.org/Bazsalanszky/Eternity/raw/branch/master/fastlane/metadata/android/en-US/images/phoneScreenshots/3.png"
alt="Screenshot 3"
height="200" >
<img
src="https://codeberg.org/Bazsalanszky/Eternity/raw/branch/master/fastlane/metadata/android/en-US/images/phoneScreenshots/4.png"
alt="Screenshot 4"
height="200" >
<img
src="https://codeberg.org/Bazsalanszky/Eternity/raw/branch/master/fastlane/metadata/android/en-US/images/phoneScreenshots/5.png"
alt="Screenshot 5"
height="200" >
## Contributing

View File

@ -98,6 +98,30 @@ android {
doNotStrip '**/*.so'
}
namespace 'eu.toldi.infinityforlemmy'
task rearrangeClass(type: Exec) {
commandLine 'python', '../scripts/fixEventBus.py'
}
applicationVariants.all { variant ->
if (variant.name == 'release') {
task("compileSingleFile${variant.name.capitalize()}", type: JavaCompile, dependsOn: rearrangeClass) {
def filePath = project.rootDir.absolutePath + '/app/build/generated/ap_generated_sources/release/out/eu/toldi/infinityforlemmy/'
source = files(filePath)
includes = ["**/EventBusIndex.java"]
classpath = variant.getCompileClasspath() + files(project.rootDir.absolutePath + '/app/build/intermediates/javac/release/classes')
destinationDir = file("$buildDir/intermediates/javac/release/classes")
}
tasks.withType(JavaCompile).all { task ->
if (task.name == 'compileReleaseJavaWithJavac') {
task.finalizedBy "compileSingleFile${variant.name.capitalize()}"
}
}
}
}
}
dependencies {
@ -246,3 +270,34 @@ dependencies {
//debugImplementation 'com.squareup.leakcanary:leakcanary-android:x.y'
}
// NB: Android Studio can't find the imports; this does not affect the
// actual build since Gradle can find them just fine.
import com.android.tools.profgen.ArtProfileKt
import com.android.tools.profgen.ArtProfileSerializer
import com.android.tools.profgen.DexFile
project.afterEvaluate {
tasks.each { task ->
if (task.name.startsWith("compile") && task.name.endsWith("ReleaseArtProfile")) {
task.doLast {
outputs.files.each { file ->
if (file.name.endsWith(".profm")) {
println("Sorting ${file} ...")
def version = ArtProfileSerializer.valueOf("METADATA_0_0_2")
def profile = ArtProfileKt.ArtProfile(file)
def keys = new ArrayList(profile.profileData.keySet())
def sortedData = new LinkedHashMap()
Collections.sort keys, new DexFile.Companion()
keys.each { key -> sortedData[key] = profile.profileData[key] }
new FileOutputStream(file).with {
write(version.magicBytes$profgen)
write(version.versionBytes$profgen)
version.write$profgen(it, sortedData, "")
}
}
}
}
}
}
}

View File

@ -24,8 +24,4 @@ allprojects {
maven { url "https://jitpack.io" }
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
}

View File

@ -1,17 +1,45 @@
<h1>Eternity</h1>
<p>A client for Lemmy, specifically designed for Android and written in Java. This project is a fork of the Infinity for Reddit project, and it is currently in the early stages of development. As such, expect many unfinished features and potential bugs!</p>
<h1>Eternity</h1>
<p>A client for Lemmy, specifically designed for Android and written in Java. This project is a fork of the Infinity for
Reddit project, and it is currently in the early stages of development. As such, expect many unfinished features and
potential bugs!</p>
<h2>Development Progress</h2>
<h2>Features</h2>
<p>Eternity is currently in the early stages of development. Expect many
unfinished features and bugs!</p>
<h3>Browsing Lemmy</h3>
<ul>
<li>[x] Implementation of basic post browsing feature</li>
<li>[x] Support for multiple account handling</li>
<li>[x] Functionality for post upvotes/downvotes</li>
<li>[x] Functionality to browse comments</li>
<li>[ ] Capability for creating a new post</li>
<li>[x] Ability to create comments</li>
<li>[ ] Elimination of code/string references specific to Reddit</li>
<li>[ ] Incorporation of private messaging feature</li>
<li>[ ] Feature for saving posts</li>
<li>[ ] Account editing function</li>
<li>[ ] Multi community view?</li>
<li>Explore various feeds (Subscribed/Local/All) and communities</li>
<li>Subscribe or unsubscribe from specific communities, with the option
to block</li>
<li>Discover communities federated with the current instance</li>
<li>Favorite a community for quick access</li>
<li>Manage your subscriptions and blocked communities</li>
</ul>
<h3>Content Engagement</h3>
<ul>
<li>Engage with content by voting, saving, sharing, and creating posts
or comments</li>
<li>Enjoy endless scrolling through feeds and posts</li>
<li>Tailor the view settings for posts (card,compact, gallery)</li>
<li>Set default preferences for post and comment sorting</li>
<li>Stay updated with notifications for replies</li>
</ul>
<h3>Account Management</h3>
<ul>
<li>Sign in to multiple accounts or instances, and effortlessly switch
between them</li>
<li>Use the inbox features to view replies, mentions, and private
messages</li>
<li>Access your profile to view your posts, comments, and saved
content</li>
</ul>
<h3>Customization</h3>
<ul>
<li>Choose between various theme options including Light, Dark,
OLED</li>
<li>Support Material You theming</li>
<li>Explore user-created themes</li>
<li>Customize font settings</li>
<li>Optional bottom navigation bar</li>
<li>Discover a plethora of other customization features</li>
</ul>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 47 KiB

32
scripts/fixEventBus.py Normal file
View File

@ -0,0 +1,32 @@
import re
import sys
def rearrange(filename):
with open(filename, 'r') as file:
content = file.read()
# Regex to find the blocks of code to rearrange
pattern = re.compile(r'(putIndex\(new SimpleSubscriberInfo\(.*?\)\);)', re.DOTALL)
blocks = pattern.findall(content)
# Sort blocks based on the class names mentioned in SimpleSubscriberInfo instances
sorted_blocks = sorted(blocks, key=lambda x: re.search(r'SimpleSubscriberInfo\((.*?),', x).group(1))
# Replace the original blocks with the sorted blocks
sorted_content = pattern.sub(lambda match: sorted_blocks.pop(0), content)
with open(filename, 'w') as file:
file.write(sorted_content)
# Project root relative to the script
project_root = __file__[:-len('/scripts/fixEventBus.py')]
path = './build/generated/ap_generated_sources/release/out/eu/toldi/infinityforlemmy/EventBusIndex.java'
# Print the path to the file to stderr
print(path, file=sys.stderr)
# Call the function with the path to EventBusIndex.java
rearrange(path)